Custom Push Segue removes navigation bar and tab bar in story board

别说谁变了你拦得住时间么 提交于 2019-11-28 23:20:02

The navigation bar and the tool bar should disappear in the storyboard when you change the segue -- that's normal. You can change the simulated metrics for the bottom bar to "Translucent Toolbar", which will add it back, so you can add buttons to it (you only want to change the simulated metrics, not drag in another tool bar which would add a second tool bar). You should still see both bars with their buttons at run time.

Try to check if you have set on storyboard an option like


That metrics are inferred on the pushed view controller (but I'm pretty sure it doesn't count).

And/or force the navigation bar and bottom bar to be visible programmatically using, inside the -viewWillAppear of the pushed view controller

[self.navigationController setNavigationBarHidden:NO animated:NO];
[self.navigationController setToolbarHidden:NO animated:NO];
SuvaP
(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    ViewController * controller = [[ViewController alloc]init];
    controller.hidesBottomBarWhenPushed=YES;
    if ([segue.identifier isEqualToString:@"Commentsegue"]) {
        //For hiding the tab bar 
        [segue.destinationViewController setHidesBottomBarWhenPushed:YES];
    } 
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!