As it turns out, using UIDynamicAnimator
, and all other dynamic animations was not needed. All I needed was the animateWithDuration:delay:usingSpringWithDamping: initialSpringVelocity: options: animations: completion:
class method. Just use it in place of any simple animateWithDuration:
method, and it yields the exact behaviour i intended to achieve.
Sample code:
[UIView animateWithDuration:0.4
delay:0
usingSpringWithDamping:0.5
initialSpringVelocity:0.5
options:0
animations:^{
//Animation code
} completion:nil];