Mic*_*ael 6 iphone video fullscreen rotation ios
我在当前的项目中遇到了一个问题,所以我创建了一个简单的应用程序,看看我是否可以隔离问题.在我的app委托中,我隐藏了状态栏.
[application setStatusBarHidden:YES animated:NO];
Run Code Online (Sandbox Code Playgroud)
在我的单视图控制器中,我有以下代码:
- (void)loadVideo
{
// HTML to embed YouTube video
NSString *youTubeVideoHTML = @"<html><head>\
<body style=\"margin:0\">\
<embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \
width=\"%0.0f\" height=\"%0.0f\"></embed>\
</body></html>";
// Populate HTML with the URL and requested frame size
NSString *html = [NSString stringWithFormat:youTubeVideoHTML, @"http://www.youtube.com/watch?v=VDRoBnL1gRg", 500, 500];
// Load the html into the webview
[self.webview loadHTMLString:html baseURL:nil];
}
Run Code Online (Sandbox Code Playgroud)
该应用程序也设置为自动旋转.
现在,问题在于:当我播放YouTube视频时,进入全屏模式,将设备旋转90度,点击"完成"退出全屏,整个界面保持向下移动20px,好像它正在容纳状态栏一样.我注意到,当全屏观看视频时,ios会添加一个状态栏,所以我猜这是问题的一部分.我已经看到本机视频播放器也出现问题.
有任何想法吗?