I created my own leftBarButtonItem:
UIBarButtonItem* homeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(homeButtonClicked:)]; self.navigationItem.leftBarButtonItem = homeButton;
How can I programmatically restore the back button to its original functionality?
The back button invokes UINavigationController popViewController, so you can replicate it to the selector homeButtonClicked:.
UINavigationController
popViewController
homeButtonClicked:
self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
self.navigationItem.leftBarButtonItem = nil;
, .