使用ios6中的MPMoviePlayerController,仅在全屏上以横向模式显示视频
我只想在ios6中使用MPMoviePlayerController全屏播放视频时,以横向模式显示视频。我的应用程序只支持纵向模式 谁能建议我怎么做使用ios6中的MPMoviePlayerController,仅在全屏上以横向模式显示视频,ios6,mpmovieplayercontroller,Ios6,Mpmovieplayercontroller,我只想在ios6中使用MPMoviePlayerController全屏播放视频时,以横向模式显示视频。我的应用程序只支持纵向模式 谁能建议我怎么做 谢谢。在您的viewController中,实现此方法 -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape } 我从下面的链接得到了答案 将应用程序委托文件更改为FLOWS及其工作模式: 仅在ios6中将UIvi
谢谢。在您的viewController中,实现此方法
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape
}
我从下面的链接得到了答案 将应用程序委托文件更改为FLOWS及其工作模式: 仅在ios6中将UIview名称更改为MPSwipableView
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
if ([[self.window.subviews.lastObject class].description isEqualToString:@"MPSwipableView"]) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
else {
return UIInterfaceOrientationMaskPortrait;
}
}
您好,谢谢您的回复,但这会导致应用程序崩溃。我的整个应用程序只支持纵向模式,我想设置全屏视频的横向模式。***由于未捕获的异常“UIApplicationInvalidInterfaceOrientation”而终止应用程序,原因是:“受支持的方向与应用程序没有共同的方向,并且应自动旋转正在返回YES”实现此方法,-(BOOL)应自动旋转{返回(!UIInterfaceOrientationSpatureUpsideDown);}我也尝试过此方法,但是不要改变方向。嗨,谢谢你的回复,但是从下面的链接中得到了答案