MPMoviePlayerController全屏显示在纵向模式项目中

时间:2023-01-19 20:57:20

in my app i have selected only the portrait mode in the project setting:

在我的app中,我只选择了项目设置中的人像模式:

MPMoviePlayerController全屏显示在纵向模式项目中

and i use it in this way:

我这样使用它:

player = [[MPMoviePlayerController alloc] init];
[player setContentURL:videoURL];
[player play];

but when i display a video using MPMoviePlayerController in full screen and i try to rotate it, doens't rotate, and stay in portrait, there is a simple way without enable the landscape mode in the project setting, to active the landscape in fullscreen?

但是当我在全屏播放MPMoviePlayerController的视频时,我试着旋转它,不会旋转,在竖屏时,有一种简单的方式,在项目设置中没有启用景观模式,在全屏中激活景观?

1 个解决方案

#1


4  

You have 2 options:

你有两个选择:

  1. Enable landscape mode in the project settings and override supportedInterfaceOrientations for your view controllers.
  2. 在项目设置中启用景观模式,并为视图控制器覆盖支持的界面朝向。
  3. In your app delegate, add the application:supportedInterfaceOrientationsForWindow: method and, when playing a movie, make sure that this returns UIInterfaceOrientationMaskAllButUpsideDown.
  4. 在app委托中,添加应用程序:supportedInterfaceOrientationsForWindow:方法,在播放电影的时候,确保它返回UIInterfaceOrientationMaskAllButUpsideDown。

#1


4  

You have 2 options:

你有两个选择:

  1. Enable landscape mode in the project settings and override supportedInterfaceOrientations for your view controllers.
  2. 在项目设置中启用景观模式,并为视图控制器覆盖支持的界面朝向。
  3. In your app delegate, add the application:supportedInterfaceOrientationsForWindow: method and, when playing a movie, make sure that this returns UIInterfaceOrientationMaskAllButUpsideDown.
  4. 在app委托中,添加应用程序:supportedInterfaceOrientationsForWindow:方法,在播放电影的时候,确保它返回UIInterfaceOrientationMaskAllButUpsideDown。