-2
我对iPhone的开发很陌生,但我得到了一个iPhone应用程序来调试,我不知道从哪里开始。iPhone中缺少导航栏
的问题是如下:
该应用程序具有在顶部导航栏的图。当我按下设备上的主页按钮时,应用程序会进入暂停模式。当我从列表中回到应用程序时,我可以看到视图,但没有导航栏。为什么导航栏会消失,我该如何解决?
这里是相同
-(void)viewWillAppear:(BOOL)animated
{
[self prepareNavBar];
}
-(void)prepareNavBar
{
self.navigationItem.hidesBackButton = NO;
CustomNavBar *the_pNavBar = [[CustomNavBar alloc] init];
[the_pNavBar prepareNavbarWithLeftButtonImage:nil leftButtonAction:nil titleImage: [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ip4_heading_comments.png"]] rightButtonImage:[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ip4_submit.png"]] rightAction:@selector(postComment) target:self backgroundImage:[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ip4_background_grey_150px.png"]] navigationBar:self.navigationController.navigationBar isStandardNavBar:NO];
[the_pNavBar release];
}
代码,请让我知道如果任何其他代码需要
问题就好办多了如果你添加一些代码。 – Yorxxx 2012-02-16 15:13:01
显示设置导航控制器并添加其根视图控制器的代码。识别它所在的文件。 – Jim 2012-02-16 15:55:29
根据要求添加代码 – Nik 2012-02-16 16:25:56