Instance Method

scheduleInRunLoop:forMode:

Adds the service to the specified run loop.

Declaration

- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode;

Parameters

aRunLoop

The run loop to which to add the receiver.

mode

The run loop mode to which to add the receiver. Possible values for mode are discussed in the "Constants" section of NSRunLoop.

Discussion

You can use this method in conjunction with removeFromRunLoop:forMode: to transfer a service to a different run loop. You should not attempt to run a service on multiple run loops.

See Also

Managing Run Loops

- removeFromRunLoop:forMode:

Removes the service from the given run loop for a given mode.