新的Xcode版本11.2.1构建应用布局问题

时间:2019-11-28 06:39:45

标签: ios xcode xcode11.2

当我将Xcode更新为11.2.1时,则生成的应用存在布局问题,像这样。

Build at Xcode 11.2.1 这是普通版本: Build at Xcode 11.2.1 before 我该如何修改?

1 个答案:

答案 0 :(得分:1)

尝试使用下面的代码显示viewController

快捷键:

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] ;