好的。我将尝试再问一次。希望我不会无意中惹恼了溢出的警察。如果你更深入地阅读这个问题,这不是一个重复的问题。
我有一个只有iphone的应用程序,我想在iphone和ipad上运行。它运行得很好,除了当我关闭状态栏时,它在iphone上是关闭的,但在ipad上却不是。有什么建议吗?谢谢。
I have set the keys in info.plist
UIStatusBarHidden = YES
and
UIViewControllerBasedStatusBarAppearance = NO
I have included the following code in viewdidload in my starting view controller
- (BOOL)prefersStatusBarHidden {
return YES;
}
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
[self prefersStatusBarHidden]; // 10-9 to remove status bar
[self setNeedsStatusBarAppearanceUpdate];
发布于 2015-12-04 11:15:53
Info.Plist项应为:
UIViewControllerBasedStatusBarAppearance = YES
https://stackoverflow.com/questions/22646929
复制相似问题