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