[英]Bottom toolbar shows in iPhone but not iPad
My app is embeded in a naviguation controller, I dragged a Empty viewController then added a tool bar at the bottom. 我的应用程序嵌入在导航控制器中,我拖动了一个Empty viewController,然后在底部添加了一个工具栏。
It shows in my storyboard, but when I run on a device/simulator it does not show in the iPad. 它显示在我的情节提要中,但是当我在设备/模拟器上运行时,它不在iPad中显示。
I did the same thing on iPhone and it shows. 我在iPhone上做了同样的事情,它显示了。
How do I solve this? 我该如何解决?
Here's the code that loads: 这是加载的代码:
- (void)viewDidLoad{
[super viewDidLoad];
// Do any additional setup after loading the view.
[self.navigationItem setHidesBackButton:YES animated:YES];
self.hidesBottomBarWhenPushed = YES ;
}
I know it's strange to have self.hidesBottomBarWhenPushed = YES ;
我知道有
self.hidesBottomBarWhenPushed = YES ;
很奇怪self.hidesBottomBarWhenPushed = YES ;
but my understanding is that the navigation controller has its own bottom bar. 但我的理解是导航控制器有其自己的底部栏。 And the same code works fine on iPhone.
同样的代码在iPhone上也可以正常工作。 So im not sure why I still get an issue.
所以我不确定为什么我仍然遇到问题。
When I set it to is Initial view controller
then it shows. 当我将其设置
is Initial view controller
它将显示。
I fixed this issue adding the transculent bar to the viewDidLoad 我修复了将透明条添加到viewDidLoad的问题
- (void)viewDidLoad{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.navigationController.navigationBar.translucent = YES;
}
Hope this helps anyone encountering this issue. 希望这对遇到此问题的任何人有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.