我有一个 UITabBarController
,其中默认 View Controller 是一个 UINavigationController
。当我在 UINavigationController
中推送某个 View 时,我希望能够隐藏 UITabBarController 的 UITabBar。
我试过添加:
delegate.tabBarController.hidesBottomBarWhenPushed = YES;
在我推送 View 之前在我的 UINavigationController
中,但这似乎并没有起到作用。
关于我应该做什么或什至可能的任何提示?提前致谢!
最佳答案
这样更好:
viewController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:viewController animated:YES];
您必须在要插入 View 的 Controller 上设置 hidesBottomBarWhenPushed = YES...
关于ios - 推送 UIView 时隐藏 UITabBar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/675887/