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

问题描述 投票:0回答:1

当我将Xcode更新为11.2.1时,构建应用程序时会出现布局问题,如下所示。

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

ios xcode xcode11.2
1个回答
0
投票

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

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] ;
© www.soinside.com 2019 - 2024. All rights reserved.