Sheehan Alam Sheehan Alam - 3 years ago 133
Objective-C Question

How can I restore the back button functionality in UINavigationController?

I have created my own leftBarButtonItem:

UIBarButtonItem* homeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks

self.navigationItem.leftBarButtonItem = homeButton;

How can I restore the original back button functionality programmatically?

pgb pgb
Answer Source

The back button will call UINavigationController's popViewController, so you can replicate that on your homeButtonClicked: selector.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download