1
动画完成后,如何隐藏我的UIImageView
?当我进入视图时,我的动画工作正常。我希望能够在动画完成后隐藏图像。我该怎么做?如何在动画完成后隐藏我的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;
}
对不起,这并不能真正回答我的问题。是的,我在使用'completion':blocks的其他类型的动画中看到了一些示例,我正在专门寻求'CAKeyframeAnimation'的帮助。 – 2015-04-04 23:01:52