title: Creating threads with parameters in Swift?
body: <p>I am trying to create a thread in swift and send two parameters. I create thread and this work:</p>
  
  <pre class="lang-swift prettyprint-override"><code>let thread = NSThread(target:self, selector:"getData", object:nil)
  thread.start()
  </code></pre>
  
  <p>But how to send parameters to my func getData? How to create object with parameters like this:</p>
  
  <pre><code>let params =...
  let thread = NSThread(target:self, selector:"getData", object:params)
  thread.start()
  
  ...
  
  getData(username: String, password: String) {
      ...
  }
  </code></pre>