我做了什么?
我正在MPMoviePlayerViewController的扩展类中播放视频,并实现了如下的方向功能
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){
return FALSE;
}
else{
return TRUE;
}
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[self setControlsPositions:toInterfaceOrientation];
}
-(BOOL)shouldAutorotate
{
return YES;
}
Run Code Online (Sandbox Code Playgroud)
我面临的问题是什么?
该应用程序可以在iPhone和iPad上使用iPad(iOS7)上的iOS6上运行良好,但视频不会在安装了iOS7的iPhone上旋转.
这个问题的原因是什么以及如何解决?
更新
我发现,在影片结束的旋转,如果
setMovieSourceType设置为MPMovieSourceTypeUnknown,但是当设置为'MPMovieSourceTypeStreaming不旋转