Как показать или подключиться к новому ViewController при нажатии кнопки на предупреждение?Swift - нажать действие предупреждения, чтобы показать новый ViewController
Это мой код
let alert = UIAlertController(title: validateQRObj.responseDescription, message: validateQRObj.productName, preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .default) { (action) -> Void in
let viewController = self.storyboard?.instantiateViewController(withIdentifier: "ProductDetialViewController")
self.present(viewController!, animated: true, completion: nil)
}
alert.addAction(action)
self.present(alert, animated: true, completion: nil)
Какая у вас проблема с кодом, который вы опубликовали? – rmaddy