I posted an example on the blog :
CGPoint originalCenter = icon.center; [UIView animateWithDuration:2.0 animations:^{ CGPoint center = icon.center; center.y += 60; icon.center = center; } completion:^(BOOL finished){ [UIView animateWithDuration:2.0 animations:^{ icon.center = originalCenter; } completion:^(BOOL finished){ ; }]; }];
The above code will animate the UIImageView * (icon) in a 2 second animation. After its completion, another animation will move the icon back to its original position.
ohho Jul 23 '10 at 7:08 2010-07-23 07:08
source share