-1

found next strange bug in iOS 13 presenting modally over fullscreen viewcontroller. Initially it was broken, it was opened in not a full screen so I tried next method described on this link Now it loads and awaits touch to anywhere on the screen. Currently this is Parent viewController, which should modally show TermsVC

mainView.hidden = YES;
        IDTermsViewController *termsVC = [[self storyboard] instantiateViewControllerWithIdentifier:@"IDTermsViewController"];
        termsVC.delegate = self;
        if (@available(iOS 13.0, *)) {
            [termsVC setModalPresentationStyle: UIModalPresentationFullScreen];
        }
        [self presentViewController:termsVC animated:YES completion:nil];

Currently after presenting this termsVC, i've got the next state like on the screenshot below. If i do any action - shake the phone, make screenshot, tap anywhere - TermsVC will appear!

On previous ios version works fine. enter image description here

swift2geek
  • 1,697
  • 1
  • 20
  • 27
  • It was not initially broken. iOS 13 changes the default presentation of modals. Don't fight it, embrace it. – rmaddy Sep 25 '19 at 15:15
  • 2
    First thing you should do is add a proper Launch Screen Storyboard to your app to eliminate the black bars at the top and bottom of your screen. – rmaddy Sep 25 '19 at 15:31
  • Unrelated but there's no need to check for iOS 13 to set the presentation style to full screen. That code is valid on earlier versions of iOS too. – rmaddy Sep 25 '19 at 15:33
  • @maddy I think you better put it as an answer to be accepted, thank you for your contribution. – coder Mar 02 '20 at 12:57

1 Answers1

7

try removing this

 if (@available(iOS 13.0, *)) {
     [termsVC setModalPresentationStyle: UIModalPresentationFullScreen];
  }

then just adding this

  termsVC.modalPresentationStyle = UIModalPresentationCustom;

this nullifies the iOS 13 presentation wackiness

Larry Pickles
  • 4,615
  • 2
  • 19
  • 36