Instance Method

main()

The main entry point routine for the thread.

Declaration

func main()

Discussion

The default implementation of this method takes the target and selector used to initialize the receiver and invokes the selector on the specified target. If you subclass NSThread, you can override this method and use it to implement the main body of your thread instead. If you do so, you do not need to invoke super.

You should never invoke this method directly. You should always start your thread by invoking the start() method.

See Also

Starting a Thread

class func detachNewThreadSelector(Selector, toTarget: Any, with: Any?)

Detaches a new thread and uses the specified selector as the thread entry point.

func start()

Starts the receiver.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software