アラートを押したときに新しいViewControllerを表示またはリンクする方法は?新しいViewControllerを表示するためのスワイププッシュアラート操作
これは、ビューコントローラ2上の任意の場所にビューコントローラ1(黄色のドット)から自分のコード
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