Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 23, 2013, 12:49 PM   #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, 02: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 10:51 PM. Reason: Please use [code] tags.
iJustinCabral is offline   0 Reply With Quote
Old Feb 23, 2013, 04: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 10: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

Similar Threads
thread Thread Starter Forum Replies Last Post
Resolved: Use View With Tab Bar & With Navigation Bar PBG4 Dude iPhone/iPad Programming 2 Mar 26, 2014 09:04 AM
iPhone: Status bar appearing where it shouldn't? stonyboys Jailbreaks and iOS Hacks 9 Jan 13, 2014 04:11 AM
Navigation Bar is OVER the UIViewWeb? Vlad1k iPhone/iPad Programming 6 Sep 16, 2013 04:17 PM
navigation controller bar is cutting off tranvutuan iPhone/iPad Programming 0 Sep 13, 2013 10:55 AM
Adding a navigation bar in Keynote frankmoss Mac Applications and Mac App Store 0 Aug 16, 2013 09:41 AM

Forum Jump

All times are GMT -5. The time now is 09:45 AM.

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

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