1
The app has 4 screens and, only one should be fixed in Landscapeleft. The others are in Portrait..
On the tab General I set it up this way.
General:
In Objective-C I can force this way:
Solution in Objective-C:
.h
-(NSUInteger) supportedInterfaceOrientations;
.m
- (void)viewDidLoad {
[super viewDidLoad];
self.supportedInterfaceOrientations;
}
- (NSUInteger)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskLandscapeLeft;
}
This way he goes to Lalscape, but he doesn’t stop me from going back to Portrait.
– CristianCotrena
What if you overwrite the shouldAutorotate? example: override func shouldAutorotate() -> Bool { Return false }
– Mateus
I was already doing it, now it worked! Thank you.
– CristianCotrena
@Cristiancotrena cool! I edited the question adding the shouldAutorotate.
– Mateus
I had to override value by mode to work :)
– CristianCotrena
@Cristiancotrena I saw :-) sorry, it was like "value" and replaced by mode at the time of reply and forgot to put in the line below ;-P thanks for the edition!
– Mateus