pub enum KeyPath {
Show 17 variants
TransformScale,
TransformScaleX,
TransformScaleY,
TransformRotation,
Opacity,
Position,
PositionX,
PositionY,
BackgroundColor,
CornerRadius,
BorderWidth,
BorderColor,
ShadowOpacity,
ShadowRadius,
ShadowOffset,
Bounds,
Custom(&'static str),
}Expand description
Property key path for animation targets.
Each variant maps to a Core Animation key path string that identifies
which property of a CALayer to animate.
§Examples
// Animate scale
let anim = CABasicAnimationBuilder::new(KeyPath::TransformScale)
.values(0.5, 1.0)
.build();
// Animate position
let anim = CABasicAnimationBuilder::new(KeyPath::PositionX)
.values(0.0, 100.0)
.build();Variants§
TransformScale
Uniform scale transform (transform.scale).
Value range: 0.0 = invisible, 1.0 = normal size.
TransformScaleX
Horizontal scale transform (transform.scale.x).
TransformScaleY
Vertical scale transform (transform.scale.y).
TransformRotation
Z-axis rotation transform (transform.rotation.z).
Value is in radians.
Opacity
Layer opacity (opacity).
Value range: 0.0 = transparent, 1.0 = opaque.
Position
Layer center position (position).
Value type: CGPoint.
PositionX
Horizontal position (position.x).
PositionY
Vertical position (position.y).
BackgroundColor
Layer background color (backgroundColor).
Value type: CGColor.
CornerRadius
Corner radius (cornerRadius).
BorderWidth
Border width (borderWidth).
BorderColor
Border color (borderColor).
Value type: CGColor.
ShadowOpacity
Shadow opacity (shadowOpacity).
ShadowRadius
Shadow radius (shadowRadius).
ShadowOffset
Shadow offset (shadowOffset).
Value type: CGSize.
Bounds
Bounds rectangle (bounds).
Value type: CGRect.
Custom(&'static str)
Custom key path string.