IOS 6 Orientation to display one view in a portrait and another view in a landscape

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; } 
+4
source share

Source: https://habr.com/ru/post/1494202/


All Articles