1

したがって、ポートレート モードでのみアプリケーションを使用しています。ムービー プレーヤーをフルスクリーンで起動し、横向きモードに回転させてから [完了] ボタンを押すと、ステータス バーは横向きモードになり、ビューは縦向きレイアウトになりますが、横向きモードになるため、がれます。

自分でデバイスを回転させると、ビューは適切にリセットされますが、これをプログラムで行う方法が必要です。

私はこれを試しました: shouldAutorotateToDeviceOrientation は、縦向きモードでのみ true を返します

[[NSNotificationCenter defaultCenter] addObserver:self
                                     selector:@selector(_moviePlayerWillExitFullscreen:)
                                             name:MPMoviePlayerWillExitFullscreenNotification object:nil];

- (void)_moviePlayerWillExitFullscreen:(NSNotification *)notification {
    1) [self willRotateToInterfaceOrientation:self.interfaceOrientation duration:0];
    2) [self attemptRotationToDeviceOrientation];
}
4

0 に答える 0