0

I am wondering if what is the best way to make my animation from in a series of path at one go. I am only able to path it in one way.

[UIView beginAnimations:nil context:NULL];
        [UIView setAnimationDuration:1];
        [UIView animateWithDuration:5 
                              delay:7 
                            options:UIViewAnimationOptionRepeat|UIViewAnimationOptionAutoreverse 
                         animations:^{faceAni.transform = CGAffineTransformMakeTranslation(40, 80); } 
                         completion:^(BOOL fin) { 
                             if (fin) {
            faceAni.transform = CGAffineTransformMakeTranslation(80, 40);

                             }
                         }
         ];

Suggestions?

  • see this link :http://stackoverflow.com/questions/7977019/understanding-of-uianimation/7977218#7977218 – banu Nov 19 '11 at 07:32

1 Answers1

0

Use this code this may be help you:

{
 context = UIGraphicsGetCurrentContext();
    [[transperantview layer] renderInContext:context];

    CGContextMoveToPoint(context, x1, y1);
    CGContextSetRGBStrokeColor(context, (255/255.0), (0/255.0), (0/255.0), 1.0);
    CGContextSetLineWidth(context, 5);
    CGContextAddLineToPoint(context, x2, y2);

    CGContextDrawPath(context, kCGPathStroke);
 imageView.contentMode = UIViewContentModeScaleToFill;

    UIGraphicsEndImageContext();
}
Aakil Ladhani
  • 984
  • 9
  • 32