在iPad中旋转全屏视频时导航和状态栏之间存在奇怪的重叠错误 [英] Strange overlapping bug between navigation and status bars when rotating fullscreen videos in iPad

查看:261
本文介绍了在iPad中旋转全屏视频时导航和状态栏之间存在奇怪的重叠错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的应用程序中实现一个视频播放器,当视频播放器全屏工作时旋转iPad会发生奇怪的事情。

I'm implementing a video player inside my application and strange things happen when rotating the iPad when the video player is working in full screen.

我的测试用例是很简单:

My test case is kind of easy:

1.-我将方向设置为垂直

1.- I set orientation to Vertical

2.-我开始视频播放(非全屏)

2.- I start video playing (non full screen)

3.-我设置全屏

4.-我在进入时旋转iPad全屏并将其设置为水平

4.- I rotate the iPad while in fullscreen and set it to horizontal

5.-我回到非全屏

6。 - 导航和状态栏以非常愚蠢的方式重叠重叠。看:

6.- Navigation and status bar become overlapped overlapped in a very silly way. Look:

7.-然后我再次将iPad旋转到垂直

7.- Then I rotate the iPad to Vertical again

状态和导航栏不再重叠。再看一下:

Status and Navigation Bars don't overlap anymore. Look again:

8.-然后我来回旋转到水平和垂直,一切都保持正常。

8.- Then I rotate back and forth to Horizontal and Vertical, and everything keeps being OK.

提示?

我已经阅读了其他一些问题,但没有明确的结论。
苹果(?)有一些官方修复,承认某种错误,并尝试修复类似情况,例如:使用MPMoviePlayerViewController时的iPad旋转错误

I've read some other questions around, but no clear conclusion comes to my mind. There are some "official" fixes from apple (?) acknowledging some kind of bug, and trying to fix similar situations, like here: iPad rotation bug when using MPMoviePlayerViewController

但即便实现这个简单的解决方案,这个bug仍然出现在我身上。
(我不知道它是不是一个bug,或者它甚至可能是一个功能(?))

But even implementing that easy solution, the bug still appears for me. (I don't know if it's a bug, or it might even be a feature (?))

我会尝试更多的搞乱,但帮助将非常受欢迎。

I'll be trying some more messing, but help will be more than welcome.

问候

推荐答案

取消隐藏状态栏在替换rootViewController之前解决这个bug

unhiding status bar BEFORE replacing rootViewController works around this bug

[UIApplication sharedApplication] .statusBarHidden = NO;
self.window.rootViewController =无论

[UIApplication sharedApplication].statusBarHidden=NO; self.window.rootViewController = whatever

这篇关于在iPad中旋转全屏视频时导航和状态栏之间存在奇怪的重叠错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆