Ios – How to hide ‘Back’ button on navigation bar on iPhone

iosiphonenavigationobjective cuinavigationcontroller

I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?

Best Answer

Objective-C:
self.navigationItem.hidesBackButton = YES;

Swift:
navigationItem.hidesBackButton = true