UINaviagtionBar not displaying?

Posted by Rajendra Bhole on Stack Overflow See other posts from Stack Overflow or by Rajendra Bhole
Published on 2010-05-24T09:03:54Z Indexed on 2010/05/24 11:01 UTC
Read the original article Hit count: 300

Filed under:

Hi,

I developing an application in which initially choose UINavigationController based application. In rooViewController xib i added two more UIView, the code is written as follows.

@implementation RootViewController @synthesize introductionView, WheelView;

  • (void)viewDidLoad { [super viewDidLoad]; [self.navigationController setNavigationBarHidden:YES]; }

pragma mark

pragma mark strart up screen:

-(void)startIntroductionScreen{ if(window == nil) { window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; } [window addSubview: introductionView]; [window makeKeyAndVisible]; }

-(void)WheelScreen{ [window addSubview:carnivalWheelView]; [window makeKeyAndVisible]; self.navigationController.navigationBar.hidden = NO;
[self.navigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"Setting" style:UIBarButtonItemStylePlain target:nil action:nil] animated:YES]; }

pragma mark

pragma mark IBAction:

-(IBAction)breakGlass:(id)sender{ [self startIntroductionScreen]; }

-(IBAction)anotherView:(id)sender{ [self WheelScreen]; }

In above code, when the -(void)WheelScreen method on the IBAction anotherView of invoke the UINaviagtionBar is not displaying.

Thank's in advance.

© Stack Overflow or respective owner

Related posts about iphone