remove(from:forMode:)
Removes the service from the given run loop for a given mode.
Declaration
func remove(from aRunLoop: RunLoop, forMode mode: RunLoop.Mode)Parameters
- aRunLoop:
The run loop from which to remove the receiver.
- mode:
The run loop mode from which to remove the receiver. Possible values for
modeare discussed in the “Constants” section of Runloop.
Discussion
You can use this method in conjunction with schedule(in:forMode:) to transfer the service to a different run loop. Although it is possible to remove an NSNetService object completely from any run loop and then attempt actions on it, it is an error to do so.