LayerAnimator
public class LayerAnimator
The LayerAnimator
class contains the supported CALayer
animatable properties, like cornerRadius
, shadowColor
, shadowOpacity
, and more.
In an Wave animation block, change these values to create an animation, like so:
Example usage:
Wave.animateWith(spring: .defaultAnimated) {
myView.layer.animator.cornerRadius = 12
myView.layer.animator.shadowOpacity = 0.5
}
-
The corner radius of the attached
layer
.Declaration
Swift
public var cornerRadius: CGFloat { get set }
-
The opacity of the attached layer.
Declaration
Swift
public var opacity: CGFloat { get set }
-
The background color of the attached layer.
Declaration
Swift
public var backgroundColor: CGColor { get set }
-
The border color of the attached layer.
Declaration
Swift
public var borderColor: CGColor { get set }
-
The border width of the attached
layer
.Declaration
Swift
public var borderWidth: CGFloat { get set }
-
The shadow opacity of the attached layer.
Declaration
Swift
public var shadowOpacity: CGFloat { get set }
-
The shadow color of the attached layer.
Declaration
Swift
public var shadowColor: CGColor { get set }
-
The shadow offset of the attached layer.
Declaration
Swift
public var shadowOffset: CGSize { get set }
-
The shadow radius of the attached layer.
Declaration
Swift
public var shadowRadius: CGFloat { get set }