init(target:selector:)
Creates a display link for a target that calls its selector.
Declaration
init(target: Any, selector sel: Selector)Parameters
- target:
An object in your app that you want the system to notify each time it updates a display.
- sel:
A selector instance that represents a method for
target.
Return Value
A new CADisplayLink object.
Discussion
The selector on the target must be a method with the following signature, where sender is the display link returned by this method.
The newly constructed display link retains the target.