iphone - Navigation Item not appearing on View Controller -


i apologize new iphone programming.

i have created master-detail iphone application (so navigation controller came project). segue new view controller created through uibarbuttonitem on masterviewcontroller. unlike detailviewcontroller (that came project) can not seem navigationitem (or navigationbar?) display on view though appears in scene list of storyboard.

heres code , screenshot:

in masterviewcontroller.m viewdidload() function

uibarbuttonitem *settingsbutton = [[uibarbuttonitem alloc] initwithtitle:@"settings" style:normal target:self action:@selector(gotosettings:)]; self.navigationitem.leftbarbuttonitem = settingsbutton; 

in masterviewcontroller.m

- (ibaction)gotosettings:(id)sender{         [self performseguewithidentifier:@"settingssegue" sender:self]; } 

i tried adding title navigationitem during viewdidload function of new viewcontroller.m class created (mentioned in link didn't work)

- (void)viewdidload {     [super viewdidload];     // additional setup after loading view.     self.navigationitem.title = @"settings";     self.navigationitem.leftbarbuttonitem = self.editbuttonitem; } 

but still shows in storyboard ( shows in list under scene not in display of view)

so question why showing , how to? want button detail view controller came master-detail project.

edit#1

i have added check whether navigation controller nil , not nil (the if statement never entered) tried changing navigation item , removing , none has worked.

if(self.navigationitem == nil) {     [ self.navigationitem init]; } self.navigationitem.title = @"settings"; self.navigationitem.leftbarbuttonitem = self.navigationitem.backbarbuttonitem; 

now have enough reputation show image can show navigation item shows in list doesnt show on view

enter image description here

the navigation item did not show because of "style" of segue.

the segue moved scene master view controller settings view controller set 'modal'. has set 'push'. done storyboard on utilities pane


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -