Bob
Bob

Reputation: 8714

Run animation after addLineToPoint for UIBezier path

I am trying to force one animation waiting for the other, but without luck.

UIBezierPath *path = [UIBezierPath bezierPath];

This is what I want to do:

[path addLineToPoint: point1];

and when this is done call this:

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

Upvotes: 1

Views: 309

Answers (1)

msgambel
msgambel

Reputation: 7340

While I'm still unclear as to your needs, here is how you can call one animation AFTER the first one finishes:

[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) {

                                      }];
                   }];

Hope that Helps!

Upvotes: 1

Related Questions