0

目前我正在使用展开以查看其路径的主视图。当展开时显示TopBar NavigationController

这是我上的发件人的ViewController所代码:

- (IBAction)showRecents:(UIStoryboardSegue *)segue { 

[self.navigationController.tabBarController setSelectedIndex:1]; 
NSLog(@"Root of Navigation Executed"); 
} 

这是平仓

enter image description here

之前的外观,这是它的外观从源头展开后视图控制器:

enter image description here

问题是我不明白为什么它不显示绿色TopBar?与TabBarController有什么关系?

这是我的路径VC:

enter image description here

+0

为什么SourceVC中没有导航栏?你有没有把它藏在那里? – rdelmar

+0

不,有办法验证这一点吗? – eddwinpaz

+0

验证什么?它看起来像你从ProfileTableviewController推到SourceVC,所以应该有一个导航栏,除非你把它设置为隐藏。 – rdelmar

回答

0

的这个问题的答案是。首先,我们需要在Source ViewController上隐藏/显示NavigationController,在它消失之前,我们需要再次显示它。在发件人ViewController上的这种方式您将能够看到导航因为它被设置为在其展开其执行的源上显示。

-(void)viewWillAppear:(BOOL)animated{ 
[self.navigationController setNavigationBarHidden:YES]; 
} 

-(void)viewWillDisappear:(BOOL)animated{ 
[self.navigationController setNavigationBarHidden:NO]; 
} 
相关问题