views:

24

answers:

1

how can i display a image on button which is presented on UINavigationController iphone ?

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
We also customize UIBarButtonItem at design time, there are a lot of facilities given by apple if you check property of UIBarButtonItem.
RRB