Many social apps are using bouncing effect for buttons and view. Just like Instagram and Facebook is using for LIKE.
Here is the few lines of code.
Simply just use your control (UIButton, UILabel, etc etc) instead of view down here...
[UIView animateWithDuration:0.3/1.5 animations:^{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.3/2 animations:^{
view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.3/2 animations:^{
view.transform = CGAffineTransformIdentity;
}];
}];
}];
0 Comment(s)