I added a UINavigationBar
in storyboard. My app has to change the title of the bar dynamically. First I tried changing the title in storyboard and ran the app, the title didn't appear. I then tried adding the title by code. First, I connected an IBOutlet
from the UINavigationItem
to my @interface
and tried adding a title like this:
_navibarTitle.title = @"Something";
It also didn't work out, the title doesn't appear. Since my app has to hide the default bar of the UINavigationController
and use custom ones, I even tried this:
self.navigationItem.title = @"Something";
and this:
self.navigationController.navigationItem.title = @"HI";
they also didn't work out. (the last two i know they wouldn't work as the default navi bar is hidden). So i guess i'm out of ideas. What could be wrong?