3

我想在按钮单击时显示新的联系页面我已经在操作按钮中编写了这段代码

{  
    ABNewPersonViewController *abnewpersonviewcontroller = [[ABNewPersonViewController alloc] init];   
    [self.navigationController pushViewController:abnewpersonviewcontroller animated:YES];
    [newPersonController release];
 }   

此代码成功地将我带到新的联系页面,但问题是导航栏未显示在新的联系页面上,我可以在其中保存记录并且上面还有取消按钮请告诉我如何在新的联系页面上显示导航我点击操作按钮

4

4 回答 4

2

用这个

ABNewPersonViewController *abnewpersonviewcontroller = [[ABNewPersonViewController alloc] init]; 
self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:abnewpersonviewcontroller animated:YES];
[newPersonController release];
于 2013-01-07T12:48:46.903 回答
1
    ABNewPersonViewController *picker =[ABNewPersonViewController new];
    UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:picker];
    picker.newPersonViewDelegate =self;
    [self presentViewController:nc animated:YES completion:nil];
于 2013-06-07T12:05:02.937 回答
0

好吧,您可以self.navigationController.navigationBarHidden = NO;在方法中添加到该推送视图控制器- (void)viewWillAppear:(BOOL)animated以强制它,但如果您没有UINavigationBarUINavigationController.

于 2013-01-07T12:45:23.550 回答
0

您是否在应用程序中隐藏了导航栏?

如果是,那么你应该在移动到联系页面之前取消隐藏............

谢谢

于 2013-01-07T12:46:58.540 回答