My application is visible only in Portrait. No problem with the main ViewController. but MPMoviePlayerController is for all orientations.
Here is my code that works great for iOS6. but now it does not work for iOS7
- (NSUInteger) application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
if ([[self.window.subviews.lastObject class].description isEqualToString:@"MPMovieView"] || [[self.window.subviews.lastObject class].description isEqualToString:@"MPSwipableView"]) {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
else {
return UIInterfaceOrientationMaskPortrait;
}
}
Please, help..
Thanks.
source
share