title: IBOutlet and IBAction in Swift
body: <p>I connected a <code>IBOutlet</code> and <code>IBAction</code> to my button variable from Interface Builder to my View Controller. How do I add an action method to the button in Swift?
  This code doesn't seem to work.</p>
  
  <pre><code>@IBOutlet var OK: UIButton!
  @IBAction func OK(sender: UIButton){}
  </code></pre>
  
  <p>The Objective-C equivalent I found is:</p>
  
  <pre><code>@interface Controller
  {
      IBOutlet id textField; // links to TextField UI object
  }
  
  - (IBAction)doAction:(id)sender; // e.g. called when button pushed
  </code></pre>