title: UIGestureRecognizer with closure
body: <p>I have as view, in which I want to perform a swipe right gesture. Unfortunately I receive the error
  EXC_BAD_ACCESS. Does anybody know what's wrong here ? Please a look at the code below.</p>
  
  <pre><code>extension UIView {
  
      func addGestureRecognizerWithAction(nizer: UIGestureRecognizer, action:() -&gt; ()) {
  
          class Invoker {
              var action:() -&gt; ()
              init(action:() -&gt; ()) {
                  self.action = action
              }
              func invokeTarget(nizer: UIGestureRecognizer) {
                  self.action()
                  println("Hi from invoker")
              }
          }
          addGestureRecognizer(nizer)
          nizer.addTarget(Invoker(action), action: "invokeTarget:")
      }
  }
  
  class BugView: UIView {
  
      override func awakeFromNib() {
          super.awakeFromNib()
  
          var swipeRight = UISwipeGestureRecognizer()
          swipeRight.direction = UISwipeGestureRecognizerDirection.Right
          self.addGestureRecognizerWithAction(swipeRight) {
              println("Hi from the gesture closure")
          }
      }
  }
  </code></pre>