1
votes

I have a table view that contains an instance of MPMoviePlayerController as the table header and when the user presses my custom overlay button, the video expands to full screen. The aspect ratio of the video is such that in portrait mode it is very small, and I imagine most users will rotate to landscape.

The problem is that I want to allow rotation when the video is full screen but not when it exits. My underlying table does not support landscape. Is there a way to support rotation only when full screen? I thought this would be a standard component of MPMoviePlayerController.

I'm using SDK 5.0, but it was originally built with 4.3.

1

1 Answers

0
votes

Have you tried subclassing the MPMoviePlayerController MPMoviePlayerViewController class, and overriding the method:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    if (!self.fullscreen) {
        return UIDeviceOrientationIsPortrait(interfaceOrientation);
    }
    return YES;
}