我希望仅在使用ios6中的MPMoviePlayerController全屏播放视频时才以横向模式显示视频。我的应用程序仅支持纵向模式。
任何人都可以建议我,我该怎么做?
感谢。
答案 0 :(得分:1)
我从下面的链接
得到了答案iOS 6 MPMoviePlayerViewController and presentMoviePlayerViewControllerAnimated Rotation
将应用程序委托文件中的更改设置为fllows及其工作:
仅将UIview名称更改为ios6中的MPSwipableView
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
if ([[self.window.subviews.lastObject class].description isEqualToString:@"MPSwipableView"]) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
else {
return UIInterfaceOrientationMaskPortrait;
}
}
答案 1 :(得分:0)
在viewController中,实现此方法
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape
}