Instance Property


The receiver's current input mode.


var currentMode: RunLoop.Mode? { get }


The receiver's current input mode. This method returns the current input mode only while the receiver is running; otherwise, it returns nil.

The current mode is set by the methods that run the run loop, such as acceptInput(forMode:before:) and run(mode:before:).

See Also

Accessing Run Loops and Modes

class var current: RunLoop

Returns the run loop for the current thread.

func limitDate(forMode: RunLoop.Mode) -> Date?

Performs one pass through the run loop in the specified mode and returns the date at which the next timer is scheduled to fire.

class var main: RunLoop

Returns the run loop of the main thread.

func getCFRunLoop() -> CFRunLoop

Returns the receiver's underlying CFRunLoop object.

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