title: How to generate a button event in Swift?
body: <p>In objective-c, a button event may be generated with this:</p>
  
  <pre><code>[button sendActionsForControlEvents: UIControlEventTouchUpInside];
  </code></pre>
  
  <p>How to do this in Swift?</p>
  
  <p>I control-dragged to create my button:</p>
  
  <pre><code>@IBAction func button(sender: AnyObject) {
       println("button tapped!")    
  }
  </code></pre>
  
  <p>When I type <code>self.button</code>, the autocomplete of Xcode makes it become:</p>
  
  <pre><code>button(sender: AnyObject)
  </code></pre>
  
  <p>If I type </p>
  
  <pre><code>button.sendActionsForControlEvents(controlEvents:.TouchUpInside)
  </code></pre>
  
  <p>then a compiler warning occurs:</p>
  
  <p>'(AnyObject) -> ()' does not have a member named 'sendActionsForControlEvents'</p>