【发布时间】:2019-06-13 09:51:01
【问题描述】:
我正在寻找使模态呈现控制器下的控制器处于活动状态(可滚动)的解决方案,我有主滚动和警报(AlertController),它们呈现在主滚动上。出现警报时,主滚动条也应该处于活动状态。
func showOkAlert(with title: String = "AppName", and message: String, closure: (()->Void)? = nil){
let alert = BagitAlertController(title: message, image: UIImage(named: "checked-large")!)
alert.modalPresentationStyle = .overCurrentContext
self.present(alert, animated: true, completion: nil)
}
如果使用控制器无法做到这一点,我会将其设置为 addSubview()
【问题讨论】: