update(_:)
Updates the completion percentage of the transition.
Declaration
func update(_ percentComplete: CGFloat)Parameters
- percentComplete:
The percentage of the transition that is currently complete, specified as a floating-point number in the range
0.0to1.0. If you specify a value less than0.0, this method changes it to0.0. Specifying a value greater than1.0would cause the animation to appear complete already.
Discussion
This is a convenience method that calls through to the updateInteractiveTransition(_:) method of the context object.
While tracking user events, your code should call this method regularly to update the current progress toward completing the transition. If, during tracking, the interactions cross a threshold that you consider signifies the completion or cancellation of the transition, stop tracking events and call the finish() or cancel() method.