MPMoviePlayerController未将其方向更改为纵向上下颠倒模式

时间:2013-08-06 11:26:47

标签: iphone ios mpmovieplayercontroller

我已经开始使用一个视图基础应用程序,只是将MPMoviePlayerController添加到Xcode默认生成的默认视图控制器中。请参阅下面的代码

 videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
 videoPlayer.view.frame = CGRectMake(0, 0, 320, 250);
 [self.view addSubview:videoPlayer.view];
 [videoPlayer play]

我几乎尝试过所有事情,但不确定我缺少什么。看看我已经尝试过了。

-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
  return UIInterfaceOrientationMaskAll;
}

- >在plist我提供了所有方向 - >还添加了方向方法在托管Player的视图控制器中。

-(BOOL)shouldAutorotate
{
  return YES;
}

-(NSUInteger)supportedInterfaceOrientations
{
   return UIInterfaceOrientationMaskAll;
}

注意:一旦我从控件点击全屏按钮,首先默认视频将采用默认控件样式(嵌入)。而且我会尝试颠倒旋转它不起作用。

0 个答案:

没有答案