美文网首页Xcode常用开发技巧
解决TabBar隐藏与显现hidesBottomBarWhenP

解决TabBar隐藏与显现hidesBottomBarWhenP

作者: SuperDanny | 来源:发表于2016-02-26 10:49 被阅读1079次

今天遇到一个郁闷的问题(以前是完全没问题的):
视图A push 视图B ,以前隐藏UITabBarController的tabBar, 我用它的一个属性hidesBottomBarWhenPushed
将其设置为YES就可以在下一级隐藏Tabbar,但是pop的时候TabBar不显现了。

【解决办法】

self.hidesBottomBarWhenPushed = YES;中的self改成你要push进入的那个viewcontroller

LoginViewController *loginVC = [[LoginViewController alloc] init];
loginVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:loginVC animated:YES];

再一次感谢您花费时间阅读这篇文章!

微博: @Danny_吕昌辉
博客: SuperDanny

相关文章

网友评论

    本文标题:解决TabBar隐藏与显现hidesBottomBarWhenP

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