I have created my own leftBarButtonItem:
UIBarButtonItem* homeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks
target:self
action:@selector(homeButtonClicked:)];
self.navigationItem.leftBarButtonItem = homeButton;
How can I restore the original back button functionality programmatically?
self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
self.navigationItem.leftBarButtonItem = nil;
This will remove your custom left button, and the back button will appear again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With