为什么旋转后标题栏出现在状态栏后面?
我有一个 UIViewController ,其视图是带有嵌入电影的 UIWebView 。当电影全屏播放并且设备旋转时,电影关闭后标题栏最终会位于状态栏后面。为什么会发生这种情况?
I have a UIViewController whose view is a UIWebView with an embedded movie. When the movie is playing full screen, and the device is rotated, the title bar ends up behind the status bar after the movie is dismissed. Why might this happen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
事实证明,视频开始时视图控制器视图的动画尚未完成。这导致它在视频播放器视图上重新显示。
Turns out that the animation of the view controller's view wasn't finished when the video started. This caused it to be redisplayed over the video player view.
我的解决方案:
My solution:
你在 UIWebView 上 autoresizingMask 了吗
?
did you autoresizingMask on the UIWebView
and
使用 MPMoviePlayerNotification 无法解决此问题,因为 UIWebView Video 不使用 MPMoviePlayerViewController 或者它是开发人员私有的。
但是,还有另一种方法可以修复此错误。
It's no way to resolve this problem using MPMoviePlayerNotification, because UIWebView Video Don't use MPMoviePlayerViewController or it's private for developer.
But, there's another way to fix this bug.