Core Animation based on Quartz provides very simple ways to create special effects in your game or application.
The following shows how to create a Move Effect of any UIView (e.g. UIButtonView, UIImageView etc.)
- +(void)move:(UIView*)view to:(CGPoint)point withDuration:(int) duration andSnapBack:(BOOL) snapBack
- {
- // Prepare the animation from the current position to the new position
- CABasicAnimation *animation =[CABasicAnimation animationWithKeyPath:@"position"];
- animation.fromValue =[view.layer valueForKey:@"position"];
- // iOS