Search code examples
iosxcodexcode11

New Xcode version 11.2.1 build app layout problem


When I update the Xcode to 11.2.1, then build the app have layout problem, like this.

Build at Xcode 11.2.1 This is the normal version: Build at Xcode 11.2.1 before How do I modify it?


Solution

  • try to presenting viewController using below code.

    Swift:

    let vc = UIViewController()
    vc.modalPresentationStyle = .fullScreen 
    self.present(vc, animated: true, completion: nil)
    

    Objective-c:

    UIStoryboard *story = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    ViewController *vc = [story instantiateViewControllerWithIdentifier:@"ViewController"];
    vc.modalPresentationStyle = UIModalPresentationFullScreen ;
    [self presentViewController:vc animated:YES completion:nil] ;