currentRunLoop
currentMode
- limitDateForMode:
mainRunLoop
NSRunLoopMode
Availability 有効性
Technology
@interface NSRunLoop : NSObject
A NSRun
object processes input for sources, such as mouse and keyboard events from the window system and NSPort
objects. A NSRun
object also processes NSTimer
events.
Your application neither creates nor explicitly manages NSRun
objects. The system creates a NSRun
object as needed for each NSThread
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 NSRun
, NSTimer
objects aren’t “input”—they’re a special type, and they don’t cause the run loop to return when they fire.
Warning 警告
The NSRun
class is generally not thread-safe, and you must call its methods only within the context of the current thread. Don’t call the methods of a NSRun
object running in a different thread, which might cause unexpected results.
currentRunLoop
currentMode
- limitDateForMode:
mainRunLoop
NSRunLoopMode
- addTimer:forMode:
- addPort:forMode:
- removePort:forMode:
- run
- runMode:beforeDate:
- runUntilDate:
- acceptInputForMode:beforeDate:
- performBlock:
- performInModes:block:
- performSelector:target:argument:order:modes:
- cancelPerformSelector:target:argument:
- cancelPerformSelectorsWithTarget:
NSTimer