I've embedded my first view into a NavigationController and then i set the segue as push. I want to change in each view the title of the Navigation bar to display something and update it through my code. i tried to call the navigation controller like this:
self.navigationController.navigationBar.topItem.title = @"YourTitle";
but this wont work, how can I do it?
Navigation controller gets the title from the viewcontroller so this will do the job
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Some Title";
}
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