title: Can't add an Alert Action to UIAlertController (Swift)
body: <p>I'm trying to add an Ok button to a UI Alert but I cannot add it using alertController.addAction</p>
  
  <p>What do I do in this case?</p>
  
  <p>Thanks in advance!!</p>
  
  <pre><code>if error == nil {
                  let alert: UIAlertController = UIAlertController(title: "Account Created", message: "Please confirm your email", preferredStyle: .Alert)
  
                  let okButton = UIAlertAction(title: "Ok", style: .Default) { action -&gt; Void in
                      self.performSegueWithIdentifier("toMain", sender: self)
  
                      alertController.addAction(okButton)
  
  
                  self.presentViewController(alert, animated: true, completion: nil)
  
                  }
  
                  } else {
  
                  println("\(error)")
              }
  </code></pre>