首页 > 解决方案 > 新Xcode 11.2.1版本构建app布局问题

问题描述

当我将 Xcode 更新到 11.2.1 时,构建应用程序时出现布局问题,就像这样。

在 Xcode 11.2.1 上构建 这是普通版本: 在 Xcode 11.2.1 之前构建 如何修改?

标签: iosxcodexcode11.2

解决方案


尝试viewController使用下面的代码进行演示。

迅速:

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

目标-c:

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

推荐阅读