My iPad app displays a movie full screen using the convenient MPMoviePlayerViewController
class. I present it like this:
[self.hostController presentMoviePlayerViewControllerAnimated:playerViewController];
And later, when notified that playing is done, I dismiss it like this:
[self.hostController dismissMoviePlayerViewControllerAnimated];
It works fine, except when the user rotates the iPad during movie playback:
1- The iPad is in vertical orientation. My view is vertical. 2- The user starts the movie in vertical orientation. The player is vertical. 3- The user rotates the iPad to the horizontal orientation. 4- The player switches to its horizontal orientation. so far so good. 5- The movie stops, the player is dismissed, my reappears, the iPad is still horizontal, but my view has stayed in the vertical orientation is was in step 1. Now it looks sideways.
Of course, if the user then rotates the iPad, it's back to normal. My view then rotates normally as the iPad rotates.
Did anyone ever encounter that? An easy fix?
Thanks.