CALayer

extension CALayer
  • Add the specified animation object to the layer’s render tree with a completion closure.

    Declaration

    Swift

    public func add(_ animation: CAAnimation, forKey key: String?, withCompletion completion: @escaping (Bool) -> Void)

    Parameters

    animation

    The animation to be added to the render tree.

    key

    A string that identifier the animation.

    completion

    A closure that is executed upon completion of the animation.