私はautolayoutを使用しています。画面では、メインビューの半分のサイズのAVPlayerViewControllerを作成します。私はUITabBarViewControllerとUINavigationControllerを使用しています。この画面は、UITabBarViewControllerの最初の子ViewControllerからナビゲートされます。コードは次のように..ですAVPlayerViewControllerを使用して、画面を横向きに回転させるにはどうすればいいですか?
avPlayerVideoController = [[AVPlayerViewController alloc] init];
avPlayer = [AVPlayer playerWithURL:[NSURL URLWithString:videoURL]];
avPlayerVideoController.view.frame = CGRectMake(imgViewVideo.frame.origin.x, imgViewVideo.frame.origin.y, imgViewVideo.frame.size.width, imgViewVideo.frame.size.height);
avPlayerVideoController.delegate = self;
avPlayerVideoController.showsPlaybackControls = YES;
avPlayerVideoController.player = avPlayer;
[avPlayerVideoController.player play];
今私は、フルスクリーンボタンをAVPlayerViewControllerが付属していることをクリックすると動画が横向きビューに回転させることにしたいです。私は携帯電話を回転させても縦向きのままです。また、フルスクリーンボタンをタップしたときに呼び出されるデリゲートメソッドもありません。私はこれがひどく必要です。どのようにこれを達成すべきかを詳細に説明してください。
ソリューションを見つけましたか? – karthikeyan
また同じ問題に直面していますが、解決策を見つけましたか? – FelipeOliveira