我创建了一个 UINavigationBarButton,我在其中放置了一个名为“更新”的按钮。单击更新按钮时,它正在导航到 SecondViewController。但问题在于 SecondViewController TabBar 没有显示。我想要做的是当我点击SecondViewController 中的后退按钮应该返回到 RootViewController。这里是代码
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title=@"GooGle";
[self.navigationItem setLeftItemsSupplementBackButton:YES];
[self.navigationController setToolbarHidden:NO];
UIBarButtonItem *nextView = [[UIBarButtonItem alloc] initWithTitle:@"update" style:UIBarButtonSystemItemPlay target:self action:@selector(updateAddress)];
self.navigationItem.rightBarButtonItem = nextView;
[nextView release];
}
-(void)updateAddress
{
SecondViewController *updateView=[[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
[self.navigationController presentViewController:updateView animated:YES completion:Nil];
[self.navigationItem setLeftItemsSupplementBackButton:YES];
}