RunLoop
The programmatic interface to objects that manage input sources.
Declaration
class RunLoopMentioned in
Overview
A RunLoop object processes input for sources, such as mouse and keyboard events from the window system and Port objects. A RunLoop object also processes Timer events.
Your application neither creates nor explicitly manages RunLoop objects. The system creates a RunLoop object as needed for each Thread object, including the application’s main thread. If you need to access the current thread’s run loop, use the class method current.
Note that from the perspective of RunLoop, Timer objects aren’t “input”—they’re a special type, and they don’t cause the run loop to return when they fire.
Topics
Accessing Run Loops and Modes
Managing Timers
Managing Ports
Running a Loop
Scheduling and Canceling Tasks
perform(_:)perform(inModes:block:)perform(_:target:argument:order:modes:)cancelPerform(_:target:argument:)cancelPerformSelectors(withTarget:)