CATempo
@MainActor
public class CATempo : TempoProviding
CATempo uses a CADisplayLink object to send out tempo updates that are synchronized with the refresh rate of the display.
-
This
CADisplayLinkobject is used to provide tempo updates.Remarks
This class provides several mechanisms for adjusting the update rate. See the
CADisplayLinkdocumentation for more information.Warning
Do not call the
addToRunLoop:forMode:,removeFromRunLoop:forMode:, orinvalidatemethods on this object, as its state is handled by CATempo directly.Declaration
Swift
@MainActor public var displayLink: CADisplayLink? -
Declaration
Swift
@MainActor public weak var delegate: TempoDelegate? -
Initializes a new
CATempoobject and adds the internalCADisplayLinkobject to the main run loop.Declaration
Swift
@MainActor public init() -
Calling this method invalides the
CADisplayLinkobject to prepare for deallocation.Declaration
Swift
@MainActor public func cleanupResources()
View on GitHub