I am trying to set interface orientation only MPMoviePlayerController is active. Meanwhile, a movie started to play. In the target of the project, I have checked Portrait, Landscape Left and Landscape Right. Also, in the AppDelegate file, I have implemented supportedInterfaceOrientationsForWindow method and I tried to check presentedViewController is a MPMoviePlayerController. However, I could not implement it correctly.
How can I solve my problem with the correct way ?
What is the best solution changing supported interface orientation when MPMoviePlayerController is active ?
Thank you for your answers
King regards
you need
UIInterfaceOrientationMaskAllonly forMPMoviePlayerControllerso, while creating the controller use aBOOLvariable to identify interface needed or not .Override the
initWithContentURLmethod and set AppDelegate BOOL variable toYESand atviewWillDisappearset the BOOL toNO.In Appdelegate.m
The flow will be perfect ,first your init method is called and you have setted BOOL variable and then
supportedInterfaceOrientationsForWindowmethod is called and revert BOOL back when view is out.