ios - 在swift中,如何在顶部保留一个UIViewController().view?like UIAlertController
问题描述
我CustomAlertViewController
在UIViewController
. 要呈现的当前代码片段CustomAlertViewController
-
CustomAlertViewController: UIViewController {}
self.present(CustomAlertViewController(), animated: true, completion: {})
但我想CustomAlertViewController
在视图层次结构之上添加。
任何建议如何实现这一目标?
解决方案
可能您想将 UIViewCotroller 的视图添加为关键窗口的子视图。检查这个答案:https ://stackoverflow.com/a/38540271/5779168
推荐阅读
- android - 我的 android xml 代码没有正确显示两个文本
- c# - 如何在 Gmail API 中获取整个电子邮件文本/正文/内容?C#
- gremlin - Tinkerpop Gremlin Get Edges that go to vertices within a list
- powershell - 带有计时器的 Powershell 弹出消息
- javascript - How to make a hole in a polygon with CreateJs?
- linux - How to get/set Bluetooth MTU value in Linux with command line tool (hciconfig/bluetoothctl)
- azure-analysis-services - How to get list of roles and members in an Azure Analysis service via Powershell
- python - Multiindex with values in DataFrame in Python Pandas?
- excel - VBA - 如何停止由过滤器更新引起的循环?
- typescript - 拆分 VueJs 组件