Hide Segemented Control on NavBar, then add Title
- by Jordan Clark
Basically I have a Segmented Controller on my NavBar right in the middle. What I want to be able to do is hide the Segmented Controller and add a title to the navigation bar. But with my code, the segmented controller is being hidden, but the title will not add, thus leaving a blank NavBar. This is my simple code in .h:
IBOutlet UISegmentedControl *toggleDay;
IBOutlet UINavigationBar *navBar;
And this is my code in my .m:
toggleDay.hidden = YES;
navBar.topItem.title = @"Title";
Any help would be great thanks!