Contents

schedule(in:forMode:)

Adds the receiver to the specified run loop.

Declaration

func schedule(in aRunLoop: RunLoop, forMode mode: RunLoop.Mode)

Parameters

  • aRunLoop:

    Run loop in which to schedule the receiver.

  • mode:

    Run loop mode in which to perform this operation, such as Default. See the Run Loop Modes section of the Runloop class for other run loop mode values.

Discussion

You can use this method in conjunction with remove(from:forMode:) to transfer the receiver to a run loop other than the default one. You should not attempt to run the receiver on multiple run loops.

See Also

Managing Run Loops