在addLineToPoint之后为UIBezierpath运行动画

时间:2012-11-03 22:05:57

标签: objective-c ios xcode

我试图强制一个动画等待另一个,但没有运气。

UIBezierPath *path = [UIBezierPath bezierPath];

这就是我想要做的事情:

[path addLineToPoint: point1];

完成后请拨打:

imageview1.transform = CGAffineTransformMakeScale(1.5f, 1.5f);

1 个答案:

答案 0 :(得分:1)

虽然我仍然不清楚你的需求,但是你可以通过以下方式调用一个动画 AFTER

[UIView animateWithDuration:1.0f
                        delay:0.0f
                      options:UIViewAnimationOptionCurveLinear
                   animations:^(void){
                     // Add in your first chunk of animated code.
                   }
                   completion:^(BOOL finished) {
                     [UIView animateWithDuration:1.0f
                                           delay:0.0f
                                         options:UIViewAnimationOptionCurveLinear
                                      animations:^(void){
                                        // Add in your second chunk of animated code.
                                      }
                                      completion:^(BOOL finished) {

                                      }];
                   }];

希望有帮助!