Instance Method

remove(from:forMode:)

Removes the receiver from the specified run loop.

Declaration

func remove(from aRunLoop: RunLoop, forMode mode: RunLoop.Mode)

Parameters

runLoop

Run loop from which to remove the receiver.

runLoopMode

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 schedule(in:forMode:) to transfer the receiver to a run loop other than the default one. Although it is possible to remove an NSNetService object completely from any run loop and then attempt actions on it, you must not do it.

See Also

Managing Run Loops

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

Adds the receiver to the specified run loop.