If you already have all of these images, you will need only one radar animation.
You can rotate the radar line using this code:
- (void) startAnimation {
CABasicAnimation *radarHand;
radarHand = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
radarHand.fromValue = [NSNumber numberWithFloat:fromAngle+M_PI];
radarHand.byValue = [NSNumber numberWithFloat:((360*M_PI)/180)];
radarHand.duration = 60.0f;
radarHand.repeatCount = HUGE_VALF;
}
(Guess the radar line - a translucent image is also with you.)
Hope this helps you.
source
share