ios - 更改 Storybord 视图控制器时 iOS 13 中的黑屏
问题描述
在 iOS 13 中,当我调用其他 StoryBoard 时,为 ViewController 充电时,我的视图上出现黑屏。
我使用此代码调用新的 StoryBoard:
UIStoryboard *homeSB = [UIStoryboard storyboardWithName:SBNameHome bundle:nil];
UIViewController *homeVC = [homeSB instantiateInitialViewController];
homeVC.modalPresentationStyle = UIModalPresentationFullScreen;
homeVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:homeVC animated:YES completion:nil];
这个项目使用多个 StoryBoard,当我调用一个新的 StoryBoard 时失败。如果我用 Xib 构建一个新的 ViewController,不会出现黑屏,但是该项目是用多个 StoryBoard 而不是 Xib 构建的。我认为这是由 iOS 13 中的新 SceneDelegate 引起的。
任何想法?谢谢。
解决方案
@Antonio Ureba
尝试演示风格
UIModalPresentationStyle.overFullScreen
推荐阅读
- c++ - 通过重新排列其字母使回文字符串成为非回文字符串
- ajax - 在 AWS EC2 中托管时,Laravel Ajax 会导致 419 未知状态响应
- playframework-2.6 - 消息文件没有选择单引号
- javascript - 字体真棒仅适用于 chrome 但不适用于 safari
- jenkins - 如何在从机而不是主机上执行 Jenkins 共享库函数?
- sql - Hive-如何使用原始表的分区“创建表作为选择..”?
- c# - 两个应用程序之间的安全密码通信
- go - 反序列化 aws 结构到字符串映射
- docker - 在从本地机器运行 docker 容器时附加一个文件(配置文件)
- pandas - 从数据框读取数据并在 x 轴上使用时间时的空白散景图