0

ios6でMPMoviePlayerControllerを使ってフルスクリーンで動画を再生している時だけ横向きで動画を表示したいです。私のアプリケーションは、縦向きモードのみをサポートしています。

誰でも私に提案してもらえますか、どうすればこれを行うことができますか?

ありがとう。

4

2 に答える 2

1

以下のリンクから答えを得ました

iOS 6 MPMoviePlayerViewController と presentMoviePlayerViewControllerAnimated Rotation

アプリケーション デリゲート ファイルをフローとその動作として変更します。

ios6 では UIview 名のみを MPSwipableView に変更します

- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
   if ([[self.window.subviews.lastObject class].description isEqualToString:@"MPSwipableView"]) {
      return UIInterfaceOrientationMaskAllButUpsideDown;
   }
   else {
      return UIInterfaceOrientationMaskPortrait;
   }
}
于 2013-09-16T08:01:55.917 に答える
0

viewController で、このメソッドを実装します。

-(NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskLandscape
}
于 2013-09-16T06:23:01.077 に答える