UIViewPropertyAnimator with a UISpringTimingParameters timingParameters doesn't respect its duration when keyframes are involved

Originator:lap.felix
Number:rdar://39495559 Date Originated:17-Apr-2018 01:46 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:iOS 11.3
Classification:UI/Usability Reproducible:Always
 
( FB5718374 )

Summary:
UIViewPropertyAnimator doesn’t respect its duration if keyframes are used and a UISpringTimingParameters object is passed as timingParameters. Keyframes work well with a normal duration.

Steps to Reproduce:
Initialize a UIViewPropertyAnimator with `- (instancetype)initWithDuration:(NSTimeInterval)duration timingParameters:(id <UITimingCurveProvider>)parameters` and pass 0.1 seconds as duration and a UISpringTimingParameters instance.

Then add an animation which includes keyframes and start the animator.

Expected Results:
The animation should last 0.1 seconds.

Actual Results:
The animation appears to have a linear curve and lasts 0.1 seconds

Version:
iOS 11.3

Notes:

Comments

Link to sample project

https://dsc.cloud/felix/UIViewPropertyAnimator-keyframes-bug.zip


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!