我正在尝试在alertView
2 可见通知/控制中心之前添加一个buttons
。一个button
是“好的”,然后通知/控制中心应该打开。第二个button
应该是取消,不应该显示通知/控制中心。
我尝试像这样添加alertView
一个applicationWillResignActive
:
func applicationWillResignActive(application: UIApplication) {
var alert = UIAlertController(title: "Alert", message: "Message", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: nil))
alert.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
当用户尝试打开通知/控制中心时,它会稍微打开,然后关闭并alertView
显示。如何在alertView
没有通知/控制中心打开的情况下制作节目?