タブバー アプリケーションで MPMoviePlayerViewController を使用してビデオを表示します。ビデオはポートレート モードでは正常に再生されますが、ランドスケープ モードでは回転しません。
タブバーのない別のプロジェクトでは、同じコードが正常に機能します。
autoresizingmask を flexibleWidth と flexibleHeight に強制しようとしましたが、成功しませんでした。
shouldAutorotateToInterfaceOrientation で YES を返すと、ステータス バーは回転しますが、ムービー インターフェイスは回転しません。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return YES;
}
-(IBAction) showFamilleMovie {
NSString *videoURL = [[NSBundle mainBundle]
pathForResource:@"film1"
ofType:@"mp4"];
MPMoviePlayerViewController* theMoviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:videoURL]];
theMoviePlayer.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self presentMoviePlayerViewControllerAnimated:theMoviePlayer];
}
プロジェクトがどこから来たのか、何か考えがありますか?
ありがとう、ヴィンセント