此代码在 iOS 7 发布之前一直运行良好。我正在分配一个 UIViewController
,hidesBottomBarWhenPushed
为 YES
,作为 UINavigationController< 的
。但无论如何都会显示 TabBar。相关代码如下:rootViewController
/
Login *lv = [[Login alloc] init];
lv.HowToUseShows = showHowToUse;
lv.hidesBottomBarWhenPushed = YES;
UINavigationController *BokShelfNav = [[UINavigationController alloc] initWithRootViewController:lv];
//...
UITabBarController *tbController = [[UITabBarController alloc] init];
tbController.viewControllers = @[BokShelfNav,...];
谁有类似的问题?
最佳答案
我发现调用方法和设置属性的顺序会影响标签栏是否显示。
如果我将 self.hidesBottomBarWhenPushed = YES;
放在 View Controller 的 viewDidLoad
方法中,我正在推送标签栏仍然显示。如果我将其移至 init
方法,标签栏将像在 iOS 6 上一样隐藏。
关于ios - hidesBottomBarWhenPushed 在 iOS 7 中被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19047747/