This is probably not UIKitDynamics, but just an animation.
UIKitDynamics used to move objects around the screen and apply physics to collisions, etc.
What you can use is a new animation method ...
- (void)animateWithDuration:(NSTimeInterval)duration
delay:(NSTimeInterval)delay
usingSpringWithDamping:(CGFloat)dampingRatio
initialSpringVelocity:(CGFloat)velocity
options:(UIViewAnimationOptions)options
animations:(void (^)(void))animations
completion:(void (^)(BOOL finished))completion;
This will enliven the change, but apply the spring effect to the animation curve.
If you change the frame of the button inside the animation block, it will be the "spring" of the new frame and looks rubber.
You can learn more about this here ... http://www.oliverfoggin.com/animate-with-springs/
source
share