I have many icons in my app and I would like to animate them in a manner similar to what happens when you try to delete applications from the iPhone\'s home screen. How can you
with blocks (iOS 4+) it would look like:
#define RADIANS(degrees) ((degrees * M_PI) / 180.0)
CGAffineTransform leftWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(-2.0));
CGAffineTransform rightWobble = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(2.0));
cell.transform = leftWobble; // starting point
cell.deleteButton.hidden = NO;
[UIView animateWithDuration:0.125 delay:0 options:(UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse) animations:^{
cell.transform = rightWobble;
}completion:^(BOOL finished){
}];