class var current: RunLoop
var currentMode : RunLoop.Mode?
func limitDate (forMode : RunLoop.Mode) -> Date?
class var main: RunLoop
struct RunLoop.Mode
Availability 有効性
Technology
class RunLoop : NSObject
A Run
object processes input for sources, such as mouse and keyboard events from the window system and Port
objects. A Run
object also processes Timer
events.
Your application neither creates nor explicitly manages Run
objects. The system creates a Run
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 Run
, Timer
objects aren’t “input”—they’re a special type, and they don’t cause the run loop to return when they fire.
Warning 警告
The Run
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 Run
object running in a different thread, which might cause unexpected results.
class var current: RunLoop
var currentMode : RunLoop.Mode?
func limitDate (forMode : RunLoop.Mode) -> Date?
class var main: RunLoop
struct RunLoop.Mode
func add(Timer, forMode : RunLoop.Mode)
func add(Port, forMode : RunLoop.Mode)
func remove(Port, forMode : RunLoop.Mode)
func run()
func run(mode: RunLoop.Mode, before: Date) -> Bool
func run(until: Date)
func acceptInput (forMode : RunLoop.Mode, before: Date)
func perform(() -> Void)
func perform(inModes : [RunLoop.Mode], block: () -> Void)
func perform(Selector, target: Any, argument: Any?, order: Int, modes: [RunLoop.Mode])
func cancelPerform (Selector, target: Any, argument: Any?)
func cancelPerformSelectors (withTarget : Any)
func schedule(options: RunLoop.SchedulerOptions?, () -> Void)
func schedule(after: RunLoop.SchedulerTimeType, tolerance: RunLoop.SchedulerTimeType.Stride, options: RunLoop.SchedulerOptions?, () -> Void)
func schedule(after: RunLoop.SchedulerTimeType, interval: RunLoop.SchedulerTimeType.Stride, tolerance: RunLoop.SchedulerTimeType.Stride, options: RunLoop.SchedulerOptions?, () -> Void) -> Cancellable
var minimumTolerance : RunLoop.SchedulerTimeType.Stride
var now: RunLoop.SchedulerTimeType
struct RunLoop.SchedulerTimeType
struct RunLoop.SchedulerOptions
class Timer