1
私は映画を再生するMPMoviePlayerControllerを使用しています。ムービーはポートレートモード(アプリが使用する唯一のモード)で起動し、デバイスが回転していてもそこにとどまります。 shouldAutoRotateetcを明示的に設定したことはありません。ビューのサイズを変更したくないため、風景や肖像画に対応する機能があります。肖像画と風景の回転にビデオが反応するようにする方法はありますか?どんな助けでも大歓迎です。私のiPhoneビデオのみポートレートモードで再生
FYI:ここに私のコード
NSString *filepath = [[NSBundle mainBundle] pathForResource:@"TestMovie" ofType:@"m4v"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
//Listen so we can clean up after the movie is over
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlaybackComplete:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayerController];
[self.view addSubview:moviePlayerController.view];
[moviePlayerController setFullscreen:YES animated:YES];
[moviePlayerController play];