I'm using this code:
[UIView animateWithDuration:ANIMATION_DURATION_SLOW
delay:0
usingSpringWithDamping:0.4
initialSpringVelocity:5.0
options:0
animations:^{
_button.transform = CGAffineTransformMakeRotation(-M_PI_4);
}
completion:nil];
But, the button only rotates the first time. No matter how many times i call this method it doesn't rotate again.
Setting a rotation transform doesn't add to the previous transform, it replaces it so you need to remember where it was during the last tap. A quick way to do this is a static variable.