问题
When I update the Xcode to 11.2.1, then build the app have layout problem, like this.
This is the normal version: How do I modify it?
回答1:
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] ;
来源:https://stackoverflow.com/questions/59083062/new-xcode-version-11-2-1-build-app-layout-problem