J'utilise ce code pour l'animation rotate:Comment faire pivoter l'image dans le compteur de vitesse?
CABasicAnimation *spinAnimation = [CABasicAnimation
animationWithKeyPath:@"transform.rotation.z"];
spinAnimation.fromValue =[NSNumber numberWithFloat:0];
spinAnimation.toValue = [NSNumber numberWithFloat:3.30];
spinAnimation.duration =2;
[imgArrow.layer addAnimation:spinAnimation forKey:@"spinAnimation"];
En point bas de ce code imageview n'est pas fixé. Je veux configurer l'image de sorte qu'elle tourne à partir d'un point fixe sur le bas de l'image (comme un compteur de vitesse).
Pouvez-vous m'aider avec ceci?
touchRect est non déclaré. Comment puis-je le déclarer? –
CGRect touchRect; –