Type Property

main

Returns the NSThread object representing the main thread.

Declaration

class var main: Thread { get }

Return Value

The NSThread object representing the main thread.

See Also

Working with the Main Thread

class var isMainThread: Bool

Returns a Boolean value that indicates whether the current thread is the main thread.

var isMainThread: Bool

A Boolean value that indicates whether the receiver is the main thread.