Mark117 Mark117 - 3 months ago 15
iOS Question

Changing Nav Bar title programatically

I'm trying to change my nav bar's title programatically but the code i'm using won't work.

self.navigationController.navigationBar.tintColor = [UIColor redColor];
self.navigationController.navigationItem.title=@"Hello";


I can manage to change the colour of the bar but not the text, anyone have any ideas/ solution?

Answer
self.navigationController.navigationBar.topItem.title = @"YourTitle";