Pulsable

public protocol Pulsable : AnyObject

A protocol that enables a ripple effect (pulse) animation at an object. You can conform your class to this protocol and use the methods to configure the animation.

  • Adds a ripple effect to an object

    Declaration

    Swift

    public func addPulseLayerAnimated(at point: CGPoint,
                                      in layer: CALayer,
                                      withColor color: UIColor? = nil,
                                      removeAfterAnimation: Bool)

    Parameters

    point

    the point where the animation should be added

    layer

    the layer to receive the animation

    color

    a color to the animation view

    removeAfterAnimation

    a boolean indicating if the animation layer should be removed after the ripple effect

  • removePulseLayer(layer:) Extension method

    Removes the animation layer from the object

    Declaration

    Swift

    public func removePulseLayer(layer: CALayer)

    Parameters

    layer

    the layer from where the animation should be removed