In your viewDidLoad
do this:
UIBarButtonItem *backBarButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_back.png"] style:UIBarButtonItemStylePlain target:self action:@selector(goBack:)];
self.navigationItem.leftBarButtonItem = backBarButton;
Implement the method goBack
:
- (void)goBack:(id)sender {
//Do something
[self.navigationController popViewControllerAnimated:YES];
}
Hope this helps.. :)