I want to display the video in landscape mode only when video is playing in fullscreen using MPMoviePlayerController in ios6. My application supports only portrait mode.
Can anybody please suggest me, how can i do this?
Thanks.
I want to display the video in landscape mode only when video is playing in fullscreen using MPMoviePlayerController in ios6. My application supports only portrait mode.
Can anybody please suggest me, how can i do this?
Thanks.
I got the answer from below link
iOS 6 MPMoviePlayerViewController and presentMoviePlayerViewControllerAnimated Rotation
Make changes in application delegate file as fllows and its working:
Only change the UIview name as MPSwipableView in ios6
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
if ([[self.window.subviews.lastObject class].description isEqualToString:@"MPSwipableView"]) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
else {
return UIInterfaceOrientationMaskPortrait;
}
}
In your viewController, implement this method,
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape
}