Swift - push alert action to show new ViewController
<p>How to show or link to new ViewController when push button on alert?</p>

<p><a href="https://i.stack.imgur.com/n8sqm.png" rel="nofollow"><img src="https://i.stack.imgur.com/n8sqm.png" alt="enter image description here"></a></p>

<p>This is my code</p>

<pre><code>let alert = UIAlertController(title: validateQRObj.responseDescription, message: validateQRObj.productName, preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .default) { (action) -&gt; 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)
</code></pre>