Specifies the timing and animation values for a single frame of a keyframe animation.
- iOS 7.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The time at which to start the specified animations. This value must be in the range
0represents the start of the overall animation and
1represents the end of the overall animation. For example, for an animation that is two seconds in duration, specifying a start time of
0causes the animations to begin executing one second after the start of the overall animation.
The length of time over which to animate to the specified value. This value must be in the range
1and indicates the amount of time relative to the overall animation length. If you specify a value of
0, any properties you set in the
animationsblock update immediately at the specified start time. If you specify a nonzero value, the properties animate over that amount of time. For example, for an animation that is two seconds in duration, specifying a duration of
0results in an animation duration of one second.
A block object containing the animations you want to perform. This is where you programmatically change any animatable properties of the views in your view hierarchy. This block takes no parameters and has no return value. This parameter must not be
To animate view properties during a keyframe animation, call this method from within the animation block you pass to the
animate method. To animate between different values, or to tweak the timing of your view property animations, you can call this method multiple times within a block.
The view properties you change in the
animations block animate over the timespan you specify in
frame parameter. The properties do not begin animating until the time you specify in the
frame parameter. After the frame start time, the animation executes over its specified duration or until interrupted by another animation.