Thread

class Thread : NSObject
  • Crashes if the current thread is not the main (UI) thread.

    Declaration

    Swift

    public static func assertIsInMainThread()
  • Crashes if the current thread is the main (UI) thread.

    Declaration

    Swift

    public static func assertIsInBackgroundThread()