Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 23, 2013, 11:49 AM   #1
hassoon
macrumors regular
 
Join Date: Jun 2009
BackBarButton not appearing in custom navigation bar. any fix?

hi, there is something that bugs me in Xcode. i'm creating an app which uses UiNavigationController however i don't want the navigation bar to appear in the initial window when the app is first loaded. i tried clicking on the Navigation Controller (the one before the root view controller) and in the inspector i chose "none" in the top bar drop down menu (in the attributes inspector). the navigation bar disappears. then i added a custom navigation bar from the library to the view that i actually want the bar to appearing, in order to go back (you can think of it ad the detailed view). however when i run the app the back button doesn't appear although i changed it's title from the inspector and the navigation bar with the title only appears. i feel like i'm changing the back button of the original navigation bar and not the new one. does anyone know how to solve this problem? is there a way to use a navigation bar in like second level or third level view of a navigation controller without letting it appear in the root view controller? thank you! P.S: if you want a visual explanation of my case just create a new project in Xcode with a master-detail template.
hassoon is offline   0 Reply With Quote
Old Feb 23, 2013, 01:37 PM   #2
iJustinCabral
macrumors member
 
Join Date: Jul 2012
Try have more white space between your questions next time. You make your intrigue hard to read, and confusing.

Code:
- (void)viewWillAppear: (BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    [super viewWillAppear:animated];
}

- (void)viewWillDisappear: (BOOL)animated
{
    [self.navigationController setNavigationBarHidden:NO animated:animated];
    [super viewWillDisappear:animated];
}
this should work
__________________
CEO/Co-Founder Thinkr LLC.

Last edited by dejo; Feb 23, 2013 at 09:51 PM. Reason: Please use [code] tags.
iJustinCabral is offline   0 Reply With Quote
Old Feb 23, 2013, 03:44 PM   #3
hassoon
Thread Starter
macrumors regular
 
Join Date: Jun 2009
Quote:
Originally Posted by iJustinCabral View Post
Try have more white space between your questions next time. You make your intrigue hard to read, and confusing.

Code:
- (void)viewWillAppear: (BOOL)animated
{
    [self.navigationController setNavigationBarHidden:YES animated:animated];
    [super viewWillAppear:animated];
}

- (void)viewWillDisappear: (BOOL)animated
{
    [self.navigationController setNavigationBarHidden:NO animated:animated];
    [super viewWillDisappear:animated];
}
this should work
Thank you so much, yes it did work! and sorry for making it difficult to read my post. have a nice day!

Last edited by dejo; Feb 23, 2013 at 09:52 PM. Reason: Quoted post edited.
hassoon is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:38 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC