I've been playing around with the awesome UIViewPropertyAnimator, but are observing something during scrubbing I don't quite understand.
Linearly scrubbing a UIViewPropertyAnimator configured with "fast" timing parameters and/or low animation duration, causes the animated properties to snap between (larger) values at the start of scrubbing.
This can be made visible with a simple bottom sheet example (recorded on iPhone 14 Pro with iOS 16.4.1):
The UIViewPropertyAnimator is instantiated as follows (the issue also observed with other initializers):
// duration set to 0.25 gives the unwanted snapping at the start of scrubbing:
UIViewPropertyAnimator(duration: 0.25, dampingRatio: 1)
// duration set to 1.25 gives the expected smooth scrubbing.
UIViewPropertyAnimator(duration: 1.25, dampingRatio: 1)
Any ideas about what's going on here? I would expect the scrubbing to be smooth independent of what parameters are given? It's especially odd that the snapping only happens at the start of the scrubbing...
Also attached the full example code: