views:

331

answers:

2

My application is in landscape mode and I use MPMoviePlayerController to play an sample video. It works fine but when I stop the video with the OK button (or if I wait until the movie ends), the orientation automatically changes to portrait. Is it possible to keep application in landscape mode when the OK button is pushed ?

I use the followwing code in my main view controller to force landscape mode :

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
A: 

I think on the MPMoviePlayerPlaybackDidFinishNotification notification you have to set the statusbarorientation back to landscape.

Ben
A: 

I have the same problem, but it only occurs in the simulator. On my iPad it works fine.