How i can do a UIView animation like a radar? I already have a UIView with the circles created with drawrect, but how i can create a line, doing a clock animation?
Like the image below :
If you are already having all these images then you only require one radar line animation.
You can rotate 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 radar line - semi transparent image is also there with you.)
Hope this will help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With