Как я могу скрыть свой UIImageView
после завершения анимации? Моя анимация работает нормально, когда я перехожу в представление. Я хочу иметь возможность скрыть изображение после завершения анимации. Как я могу это сделать?
-(void) animate
{
NSLog(@"Animate");
CGPoint startPoint = [pickerCircle center];
CGPoint endPoint = [pickerButton1 center];
CGMutablePathRef thePath = CGPathCreateMutable();
CGPathMoveToPoint(thePath, NULL, startPoint.x, startPoint.y);
CGPathAddLineToPoint(thePath, NULL, endPoint.x, endPoint.y);
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
animation.duration = 3.f;
animation.path = thePath;
animation.repeatCount = 2;
animation.removedOnCompletion = YES;
[pickerCircle.layer addAnimation:animation forKey:@"position"];
pickerCircle.layer.position = endPoint;
}