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.
-
addPulseLayerAnimated(at:Extension methodin: withColor: removeAfterAnimation: ) 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
pointthe point where the animation should be added
layerthe layer to receive the animation
colora color to the animation view
removeAfterAnimationa 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
layerthe layer from where the animation should be removed