Ios 如何在横向模式下播放视频
祝你节日快乐 我正在做肖像模式的总应用程序。但是,在我的应用程序中,有视频选项卡。选择一个视频时,它仅在纵向模式下播放。但我只想在横向模式下玩Ios 如何在横向模式下播放视频,ios,screen-orientation,Ios,Screen Orientation,祝你节日快乐 我正在做肖像模式的总应用程序。但是,在我的应用程序中,有视频选项卡。选择一个视频时,它仅在纵向模式下播放。但我只想在横向模式下玩 谢谢您可以创建MPMoviePlayerController的子类,并实现以下三种方法: - (BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationLandsca
谢谢您可以创建
MPMoviePlayerController的子类
,并实现以下三种方法:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationLandscapeLeft || UIInterfaceOrientationLandscapeRight;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeLeft;
}
最后,使用MPMoviePlayerController子类播放视频