title: How to resolve "target does not implement selector" this exception when use NSThread spawn thread?
body: <p>I am a pretty new in use <code>NSThread</code> to spawn thread. In my practise, I want to spawn a thread to execute a method that print a String in <code>CreateThread</code> Class. But when I run my program, "target does not implement selector" exception is displayed in the console. How I should to be done in order to resolve this problem? Thanks for answer.</p>
  
  <p>Code below:</p>
  
  <pre><code>import Foundation
  
  class CreateThread {
  
  func HelloWorld() {
  
      print("Hello World!")
  
      NSThread.detachNewThreadSelector("secondaryThreadMethod", toTarget: self, withObject: nil)
  
      print("Test")
  
  }
  
  func secondaryThreadMethod() {
  
      print("Hello World in Secondary Thread!")
  
  }
  
  }
  
  let createThread = CreateThread()
  createThread.HelloWorld()
  </code></pre>