我不是唯一一个遇到此类问题的人。这是另一张,播放 YouTube 视频后状态栏高度发生变化 https://stackoverflow.com/questions/15483717/status-bar-height-changes-after-playing-a-youtube-video。但我仍然找不到解决这个问题的方法。我没有使用 MPMoviePlayerController。我想我只需要使用这些代码即可;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
self.webView.frame = CGRectMake(0.0,
20.0,
self.webView.frame.size.width,
self.webView.frame.size.height);
但它并不是那么有效。
请看下面的图片..
乍一看,这就是我的“家”的样子。
播放 Youtube/Vimeo(或其他)视频时状态栏消失。
当我回去时,看到他们挤在一起。
发现FB知道如何处理这个问题。他们的状态栏就出现在那里。
有什么帮助吗???
提前干杯!
我不知道是否适用于您的情况,但就我而言,状态栏在我加载 UIImagePickerController 并更改默认屏幕方向后出现。
我修复了这种情况添加application.statusBarHidden = YES;在 appDelegate 里面像这样:
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
// Detect if I need to hide the StatusBar (optional)
if (iNeedToHide == YES) {
application.statusBarHidden = YES;
}
return UIInterfaceOrientationMaskLandscape;
}
我希望这可以帮助你。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)