ios - 防止视图控制器堆叠 IOS 13 (swift)
问题描述
我正在开发一个应用程序,最近更新到我的 Xcode。通过此更新,视图控制器的呈现方式发生了变化,我想将其恢复为旧方式。他们过去常常显示在其他人之上,但现在他们“堆叠”了。
解决方案
您只需要将呈现的视图控制器 modalPresentationStyle 更改为全屏。
let myModalController = MyModalController()
myModalController.modalPresentationStyle = .overFullScreen
self.present(myModalController, animated: true, completion: nil)
推荐阅读
- ios - 每次调用时清除数组
- html - 避免在 git commit 上自动格式化源文件
- javascript - 用户发送短信后尝试从 Twilio 获取响应
- r - 将Wide重塑为Long但不重塑R上的所有变量
- python - 有什么方法可以使用 Python 在 Hive 上创建数据库?
- python - 尝试为 Node.JS 客户端编写 python 服务器,无法获取数据
- python - 为什么在第一个代码有效时,第二个代码会出现类型错误?
- c++ - 使用平台特定依赖的跨平台库
- java - 以最小值和最大值捕捉值的最佳方法?
- elasticsearch - 弹性低级客户端 - 如何在搜索查询中包含多个索引