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.
- (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];
}