1

Is any restriction on iOS 13 on orientation Landscape, for modal presentation style View Controllers? For fullScreen presentation style works, but on modal freezing and crashes.

enter image description here App delegate:

 - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
    if (self.shouldRotate) {
        return UIInterfaceOrientationMaskAll;
    } else {
        return UIInterfaceOrientationMaskPortrait;
    }

Func:

-(void) restrictRotation:(BOOL) restriction {
    AppDelegate* appDelegate = (AppDelegate*)[UIApplication sharedApplication].delegate;
    appDelegate.shouldRotate = restriction;
}

viewWillAppear

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self restrictRotation:YES];
}
pajtimid
  • 518
  • 1
  • 4
  • 13

0 Answers0