I have two view controllers,I have some videos in FirstViewController,if I click on video it will display on SecondViewController with landscape mode,after clicking back button again the FirstViewController should appear in Potrait mode.Here is my code
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
but it not works for me.
Thanks
I made a simple workaround at this question a few weeks ago. If you want, you can link the return value of the rootviewcontroller shouldAutoRotate/supportedInterfaceOrientation to the presentation of the second view controller doing this
RootViewController
And in the secondView controller you have to call the setter method in the viewDidAppear to modify values. Then, in the viewDidDisappear, or when you dismiss the controller, you will reset the values.