How to set the title of a Navigation Bar programmatically?
In viewDidLoad
self.title = @"Title";
Write the below code in viewDidLoad
or may be better would be under initWithNibName:
self.navigationItem.title = @"title";
Thanks.
Swift 3 Version:
If you use a navigation bar without navigation controller, then you can try this:
navigationBar.topItem?.title = "Your Title"
Hope for help.
In your UIViewController
self.navigationItem.title = @"The title";