美文网首页
NavigationBar和Tabbar的跳转平滑隐藏

NavigationBar和Tabbar的跳转平滑隐藏

作者: 木子冰洛 | 来源:发表于2017-03-09 16:30 被阅读52次

如题: 很简单, 在跳转到的控制器写下如下代码:

一,NavigationBar 注: 后面的animated: 填willAppear的animated动画是关键, 不要直接填yes

#pragma mark - viewWillAppear

-(void)viewWillAppear:(BOOL)animated{

[super viewWillAppear:animated];

[self.navigationController setNavigationBarHidden:NO animated:animated];

}

二, Tabbar

在跳转时:

self.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:ideaVc animated:YES];

相关文章

网友评论

      本文标题:NavigationBar和Tabbar的跳转平滑隐藏

      本文链接:https://www.haomeiwen.com/subject/cmtggttx.html