简体   繁体   English

底部工具栏在iPhone中显示,但在iPad中不显示

[英]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 ;

}

这是我故事板上的iPad

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.

相关问题 如何解决 position:fixed for a bottom toolbar on iOS (iPhone/iPad) - How to resolve position:fixed for a bottom toolbar on iOS (iPhone/iPad) UIView在iPhone上显示完美,但在iPad上却不完美 - UIView shows perfect on iPhone but not on iPad iPhone应用程序转换为iPad应用程序显示iPhone xib不是iPad xib - iPhone app converted to iPad app shows iPhone xib not iPad xib 警报在Iphone上显示与在Ipad上显示不同 - Alert Shows Different on Iphone than on Ipad 图像显示在 iPhone 模拟器中,但不显示在 ipad 中 - Swift - Image shows up in iPhone simulator but not ipad - Swift UIDatePicker在iPhone中可以正常显示,但在iPad中则不能 - UIDatePicker shows fine in iPhone but it doesn't in iPad 带有UiScrollView的iPad SplitView显示横向视图的下半部分 - iPad SplitView with UiScrollView on it shows bottom half of view in landscape 如何使用选择器和工具栏进行视图显示停留在iPhone屏幕底部 - How to make a view with picker and toolbar stay at the bottom of iphone screen 定制的导航控制器工具栏比iPhone底部高一像素 - Customized navigation controller toolbar is one pixel upper than the bottom of iPhone 获取 UIActivityViewController(共享)以在 iPhone 上显示的方式在 iPad 上显示? - Get UIActivityViewController (share) to show on iPad in the way it shows on iPhone?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM