I have UITabBarController
app which plays video and shows other information in other UITabBar
tabs. In iOS 6 UIView
rotation methods have been deprecated, and now I need to use shouldAutoRotate
and supportedInterfaceOrientations
methods. For video playing I use MPMoviePlayerViewController
.
How to rotate only this player view? I can only rotate whole app, but don't want to do this. I present MPMoviePlayerViewController
but it doesn't rotate as in iOS 5 and earlier.
In plist
setting I've set only 1 Portrait interface orientation. If I set other - whole app will be rotated.
I had the same problem with my app.
How the rotation in iOS 6 work is that.
=> when ever you are using UINavigationCOntroller the method in AppDelegate
decides whether to rotate or not.
=> when the view is presented in the Modal presentation style the method
which is inside the viewController for that view triggers the method in the appDelegate. And as 1st case appDelegate decides to rotate or not.
My Solution::
What I did for Modal presentation was that. Created a flag in app delegate.
when ever the flag is YES it rotates to Landscape and else its only Portrait.
And to toggle between rotations
Note: This works is only for view that are Modely Presented. Using Flag, not a good coding practice.