Adds the receiver to the specified run loop.
SDKs
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Foundation
Declaration
Parameters
runLoop
Run loop in which to schedule the receiver.
runLoopMode
Discussion
You can use this method in conjunction with remove(from:
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.