how can i display a image on button which is presented on UINavigationController iphone ?
views:
24answers:
1
A:
if you mean the back button that is displaying on the Navigation Bar you can do
UIBarButtonItem *barBtnItem = [[UIBarButtonItem alloc]initWithTitle:@"title" style:UIBarButtonItemStyleBordered target:nil action:nil];
barBtnItem.image = [UIImage imageNamed:@"image.png"];
self.navigationItem.backBarButtonItem=barBtnItem;
[barBtnItem release];
Put this code in the Previous page's viewDidLoad
method or anywhere else before
[self.navigationController pushViewController:viewController animated:YES];
this line
mihirpmehta
2010-04-06 05:07:53
We also customize UIBarButtonItem at design time, there are a lot of facilities given by apple if you check property of UIBarButtonItem.
RRB
2010-04-06 08:03:17