In my application, I need to handle a different orientation for my ViewControllers.
ViewController1must support only landascape orientation.ViewController2must support landscape + portrait orientation.
I enable, in Summury project, all orientations like this:

So, I insert this code in ViewController1:
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
And I insert this code in ViewController2 :
- (BOOL)shouldAutorotate
{
return YES;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskAll;
}
The problem is that ViewController1 rotates also in portrait orientation (it should support only landscape orientation).
Any idea?
Thank you all very much!