title: Problems with getting text from UIAlertView textfield
body: <p>In my application I want a alert with a textfield. After clicking on "Done" I want to save the textfield input in a String. After clicking on "Cancel" I want only to close the alert. I've created my alert like this:</p>
  
  <pre><code>    var alert = UIAlertView()
      alert.title = "Enter Input"
      alert.addButtonWithTitle("Done")
      alert.alertViewStyle = UIAlertViewStyle.PlainTextInput
      alert.addButtonWithTitle("Cancel")
      alert.show()
  
      let textField = alert.textFieldAtIndex(0)
      textField!.placeholder = "Enter an Item"
      println(textField!.text)
  </code></pre>
  
  <p>The alert looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/eKDMf.png" alt="My alert"></p>
  
  <p>I want to know how to get the text from the textfield, and how to create events for the "Done" button and the "Cancel" button.</p>