One Logo Pool Ball
Foundation · IOS API REFERENCE

RunLoop

class · SDK 27.1

class RunLoop

Members (21)

get

current

TypeScript
static get current(): RunLoop
Swift declaration
class var current: RunLoop { get }
get · iOS 2.0+

main

TypeScript
static get main(): RunLoop
Swift declaration
class var main: RunLoop { get }
method

acceptInput

TypeScript
acceptInput(mode: RunLoop_Mode, limitDate: globalThis.Date): void
Swift declaration
func acceptInput(forMode mode: RunLoop.Mode, before limitDate: Date)
method

add

TypeScript
addForMode(aPort: Port, mode: RunLoop_Mode): void
Swift declaration
func add(_ aPort: Port, forMode mode: RunLoop.Mode)
method

add

TypeScript
addForMode58794(timer: Timer, mode: RunLoop_Mode): void
Swift declaration
func add(_ timer: Timer, forMode mode: RunLoop.Mode)
method

cancelPerformSelectors

TypeScript
cancelPerformSelectors(target: unknown): void
Swift declaration
func cancelPerformSelectors(withTarget target: Any)
method

getCFRunLoop

TypeScript
getCFRunLoop(): _CoreFoundation_CFRunLoop
Swift declaration
func getCFRunLoop() -> CFRunLoop
init

init

TypeScript
static init(): RunLoop
Swift declaration
init()
method

limitDate

TypeScript
limitDate(mode: RunLoop_Mode): (globalThis.Date) | null
Swift declaration
func limitDate(forMode mode: RunLoop.Mode) -> Date?
method · iOS 10.0+

perform

TypeScript
perform(block: (() => void)): void
Swift declaration
func perform(_ block: @escaping @Sendable () -> Void)
method · iOS 10.0+

perform

TypeScript
performInModesBlock(modes: Array<RunLoop_Mode>, block: (() => void)): void
Swift declaration
func perform(inModes modes: [RunLoop.Mode], block: @escaping @Sendable () -> Void)
method

remove

TypeScript
remove(aPort: Port, mode: RunLoop_Mode): void
Swift declaration
func remove(_ aPort: Port, forMode mode: RunLoop.Mode)
method

run

TypeScript
run(): void
Swift declaration
func run()
method

run

TypeScript
runModeBefore(mode: RunLoop_Mode, limitDate: globalThis.Date): boolean
Swift declaration
func run(mode: RunLoop.Mode, before limitDate: Date) -> Bool
method

run

TypeScript
runUntil(limitDate: globalThis.Date): void
Swift declaration
func run(until limitDate: Date)
get

currentMode

TypeScript
get currentMode(): (RunLoop_Mode) | null
Swift declaration
var currentMode: RunLoop.Mode? { get }
get · iOS 13.0+

minimumTolerance

TypeScript
get minimumTolerance(): RunLoop_SchedulerTimeType_Stride
Swift declaration
var minimumTolerance: RunLoop.SchedulerTimeType.Stride { get }

The minimum tolerance the run loop scheduler allows.

get · iOS 13.0+

now

TypeScript
get now(): RunLoop_SchedulerTimeType
Swift declaration
var now: RunLoop.SchedulerTimeType { get }

The run loop scheduler's definition of the current moment in time.

method · iOS 13.0+

schedule

TypeScript
scheduleAfterIntervalToleranceOptions(date: RunLoop_SchedulerTimeType, interval: RunLoop_SchedulerTimeType_Stride, tolerance: RunLoop_SchedulerTimeType_Stride, options: (RunLoop_SchedulerOptions) | null, action: (() => void)): SDKHandle
Swift declaration
func schedule(after date: RunLoop.SchedulerTimeType, interval: RunLoop.SchedulerTimeType.Stride, tolerance: RunLoop.SchedulerTimeType.Stride, options: RunLoop.SchedulerOptions?, _ action: @escaping () -> Void) -> any Cancellable

Performs the action at some time after the specified date, at the specified frequency, using the specified tolerance and options.

method · iOS 13.0+

schedule

TypeScript
scheduleAfterToleranceOptions(date: RunLoop_SchedulerTimeType, tolerance: RunLoop_SchedulerTimeType_Stride, options: (RunLoop_SchedulerOptions) | null, action: (() => void)): void
Swift declaration
func schedule(after date: RunLoop.SchedulerTimeType, tolerance: RunLoop.SchedulerTimeType.Stride, options: RunLoop.SchedulerOptions?, _ action: @escaping () -> Void)

Performs the action at some time after the specified date, using the specified tolerance and options.

method · iOS 13.0+

schedule

TypeScript
scheduleOptions(options: (RunLoop_SchedulerOptions) | null, action: (() => void)): void
Swift declaration
func schedule(options: RunLoop.SchedulerOptions?, _ action: @escaping () -> Void)

Performs the action at some time after the specified date, using the scheduler's minimum tolerance.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

RunLoop.perform(_:target:argument:order:modes:)

Objective-C selectors cannot cross the bridge.

RunLoop.cancelPerform(_:target:argument:)

Objective-C selectors cannot cross the bridge.

All Foundation types →