title: Repeat function using NSTimer fails with target: self in Swift
body: <p>I found <a href="https://stackoverflow.com/questions/24007518/how-can-i-use-nstimer-in-swift">this question</a> and tried to copy the code to my Xcode project, but I'm getting the following error message.</p>
  
  <blockquote>
    <p>error: use of unresolved identifier 'self'</p>
  </blockquote>
  
  <p>What's the right way?</p>
  
  <p><strong>EDIT:</strong> Here the code, tested in a playground:</p>
  
  <pre><code>    //: Playground - noun: a place where people can play
  
  import Cocoa
  import Foundation
  
  func sayHello() {
      print("hello World")
  }
  
  var SwiftTimer = NSTimer()
  SwiftTimer = NSTimer.scheduledTimerWithTimeInterval(1, target:self, selector: Selector("sayHello"), userInfo: nil, repeats: true)
  </code></pre>