iOS 10 has a couple of new classes for animating. Notable ones include UIViewPropertyAnimator
and UISpringTimingParameters
. The property animator can be created with a duration and timing parameters - the timing parameters can be an instance of the spring parameters.
One common complaint about spring animation APIs in iOS in the past is that they require a duration - the duration of a real spring animation should be determined by the spring properties like damping ratio and initial velocity. UISpringTimingParameters
can be created with those kinds of parameters.
My question: Does UIViewPropertyAnimator
still use the duration you give it when its timing curve is a spring? Or will it discard the duration and use the spring parameters to calculate it? That would be a weird API decision on Apple's part, but it also seems weird to come so close to giving designers what they want (real springs) and yet not quite get there (force specifying a duration).