Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Nav Bar title programmatically

Tags:

I'm trying to change my nav bar's title programmatically 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.

like image 578
mhorgan Avatar asked Jun 05 '12 09:06

mhorgan


1 Answers

self.navigationController.navigationBar.topItem.title = @"YourTitle";
like image 159
Martol1ni Avatar answered Oct 22 '22 16:10

Martol1ni