setTransformRamp(fromStart:toEnd:timeRange:)
Sets a transform ramp to apply during a given time range.
Declaration
func setTransformRamp(fromStart startTransform: CGAffineTransform, toEnd endTransform: CGAffineTransform, timeRange: CMTimeRange)Parameters
- startTransform:
The transform to be applied at the starting time of
timeRange. - endTransform:
The transform to be applied at the end time of
timeRange. - timeRange:
The time range over which the value of the transform is interpolated between
startTransformandendTransform.
Discussion
During a transform ramp, the affine transform is interpolated between the values set at the ramp’s start time and end time. Before the first specified time for which a transform is set, the affine transform is held constant at the value of CGAffineTransformIdentity; after the last time for which a transform is set, the affine transform is held constant at that last value.