Reputation: 4629
I want to play the video only in landscape mode in iPhone SDK.40(MPMoviePlayerViewController). It should not support portrait mode play back. How do we do this.
Upvotes: 2
Views: 4403
Reputation: 1507
I found this documentation here:
So basically you just need to create your own subclass of MPMoviePlayerViewController and override the shouldAutorotateToInterfaceOrientation: method, like so:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
Upvotes: 11