Instance Method


Registers the display link with a run loop.


func add(to runloop: RunLoop, forMode mode: RunLoop.Mode)



The run loop to associate with the display link.


The mode in which to add the display link to the run loop. You may specify a custom mode or use one of the modes listed in RunLoop.


You can associate a display link with multiple input modes. While the run loop is executing in a mode you have specified, the display link notifies the target when new frames are required.

The run loop retains the display link. To remove the display link from all run loops, send an invalidate() message to the display link.

See Also

Scheduling the Display Link to Send Notifications

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

Removes the display link from the run loop for the given mode.

func invalidate()

Removes the display link from all run loop modes.