title: UIAlertcontroller as an action in Swift
body: <p>So I want to have an alert popping up telling me a message, then I want it to wait for me until i press OK and then it will continue with the function. For example.</p>
  
  <pre><code>@IBAction Alert() {
      let alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
      alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
      self.presentViewController(alertController, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>The problem is that now it won't do anything and if I just put in a function afterwards it does it directly, not waiting until I've pressed OK. Does anyone know how to do this?</p>
  
  <p>By the way, in this example the message would be title, message, which I'm aware of and thats not what i need in this case ;)</p>
  
  <p>Thanks in advance!</p>