title: UIAlertController Segue to Different Page (Swift)
body: <p>I was able to write a UIAlertController for my button, and it work fine, but I don't know how to segue to a different page once I press the YES or OK button. At the moment, the YES or OK button goes nowhere. </p>
  
  <pre><code>@IBAction func SubmitButton(sender: AnyObject) {
  
  
          if a &gt; 28.87 {
  
  
              var alert = UIAlertController(title: "H4 with Guide Pins", message: "Can it be removed?", preferredStyle: UIAlertControllerStyle.Alert)
  
              alert.addAction(UIAlertAction(title: "YES", style: UIAlertActionStyle.Default, handler: nil))
  
              alert.addAction(UIAlertAction(title: "NO", style: UIAlertActionStyle.Default, handler: nil))
  
              self.presentViewController(alert, animated: true, completion: nil)
  
          } 
  
          else if data2.text == "" {
  
  
              var alert = UIAlertController(title: "Dimension", message: "Missing Data Input.", preferredStyle: UIAlertControllerStyle.Alert)
  
              alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
  
              self.presentViewController(alert, animated: true, completion: nil)
  
          }
  
          else {
  
  
              var alert = UIAlertController(title: "H4 with Guide Pins", message: "Enter Swallow Dimension.", preferredStyle: UIAlertControllerStyle.Alert)
  
              alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
  
              self.presentViewController(alert, animated: true, completion: nil)
  
              self.view.endEditing(true)
  
          }
  
      }
  </code></pre>