I\'ve been trying to rotate a button using the following method:
-(IBAction)rotate:(id)sender{
CGPoint pencilCenter = pencil.center;
[pencil setCente
Import "QuartzCore/QuartzCore.h" and try this,
CABasicAnimation *fullRotation;
fullRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
fullRotation.delegate = self;
fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)];
fullRotation.duration = 1.7;
fullRotation.repeatCount = 2;
[btnTemp.layer addAnimation:fullRotation forKey:@"360"];