I’ve got a UINavigationController which is created in my App Delegate.
After pushing a view controller, I would like the navigationItem of that view to ‘forget’ the previous view controller (stop displaying its back button), while still retaining the title of the newly-pushed view controller.
How could I achieve this? I’ve tried setting the leftBarButtonItem of the new view controller’s navigationItem using
self.navigationItem.leftBarButtonItem = nil;
in viewDidLoad, but to no avail.
Any help appreciated.
In your New(second in stack) view controller hide the back Button by using navigationItem’s method
setHidesBackButton:.Please try following code in your new view controller:
this will hide the back button and user could not able to navigate back.