For my example I used label, you can use any view.
CGRect labelFrame = CGRectMake( 0, 0, 100, 20);
UILabel *aLabel = [[UILabel alloc] initWithFrame:labelFrame];
aLabel.font = [UIFont systemFontOfSize:13];
aLabel.textColor = [UIColor colorWithRed:0.22 green:0.0 blue:0.0 alpha:2.0];
aLabel.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.0];
aLabel.textAlignment = UITextAlignmentRight;
aLabel.text = @"Custom";
//Important lines
UIBarButtonItem *aLabelItem = [[UIBarButtonItem alloc] initWithCustomView:aLabel];
self.navigationItem.rightBarButtonItem = aLabelItem;
//dont forget to release lable
[aLabel release];
Wednesday, January 20, 2010
Monday, January 18, 2010
Setting background color of UIView as of TableView
Setting the background color of UIView to background color used for table view by iPhone OS is pretty east . Just put the following line of code in your viewController's viewDidLoad or any UI initialization method.
self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
And here you go...
Wish You All Belated Happy New Year....
self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
And here you go...
Wish You All Belated Happy New Year....
Thursday, November 5, 2009
Thursday, October 22, 2009
Static Code Analysis using Clang and Xcode 3.2
The Clang Static Analyzer, usually called "Clang" . It uses compiler techniques to analyze the structure of C and Objective-C programs to identify bugs.
It can detect memory leaks, double-frees, bad pointer references, and other such bugs, that will otherwise take your significant efforts to fix. It creates a report showing a bunch of possible bugs and/or problems with your code.
I am using it currently , will blog more about it in coming days..
Some use full links:
http://iphonedevelopment.blogspot.com/2009/02/clang-static-analyzer.html
http://www.rogueamoeba.com/utm/2008/07/14/the-clang-static-analyzer/
It can detect memory leaks, double-frees, bad pointer references, and other such bugs, that will otherwise take your significant efforts to fix. It creates a report showing a bunch of possible bugs and/or problems with your code.
I am using it currently , will blog more about it in coming days..
Some use full links:
http://iphonedevelopment.blogspot.com/2009/02/clang-static-analyzer.html
http://www.rogueamoeba.com/utm/2008/07/14/the-clang-static-analyzer/
Wednesday, October 14, 2009
Subscribe to:
Posts (Atom)