0
我的代码UIAlertController call
。我需要添加切换到警报视图。我可以将开关添加到UIAlertController吗?
let alertController = UIAlertController(title: "Поздравляем!", message: "Ваш комментарий сохранен! Если хотите изменить его, выключите и включите переключатель Комментария!", preferredStyle: UIAlertControllerStyle.alert)
let okAction = UIAlertAction(title: "Окей", style: .default) { (action) -> Void in
let sb = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "mailVerify")
self.present(sb, animated: true, completion: nil)
}
alertController.addAction(okAction)
self.present(alertController, animated: true, completion: nil)
你的意思是你想降级它的兼容性? – Honey
可能的重复https://stackoverflow.com/questions/35029845/switch-in-uialert-controller-programatically –
可能重复[切换在UIAlert控制器编程](https://stackoverflow.com/questions/35029845/switch -in-uialert控制器-编程) –