I want to demonstrate one view in the landscape by force. All other species are in the portrait.
I tried the code below to show the landscape mode when it comes from portrait mode. He does not work.
How can i do this?
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if ((interfaceOrientation == UIInterfaceOrientationMaskLandscape) || (interfaceOrientation == UIInterfaceOrientationMaskLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationMaskLandscapeRight)) { return YES; } return NO; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationLandscapeRight; } -(BOOL)shouldAutorotate{ return NO; } -(NSInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscape; }
source share