Hi, I am trying to make a circle image which rotates when the user drags the wheel
This is my code:
CABasicAnimation *rotationAnimation;
rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
rotationAnimation.toValue = [NSNumber numberWithFloat:angleRadians];
rotationAnimation.duration = 10;
rotationAnimation.cumulative = YES;
rotationAnimation.repeatCount = 1.0;
rotationAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
[self.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];
The main issue I am having though, that the image is being reset when it is finished.
Any help please?