0

Please i need to know how can i do pulling effect using multiple image.

Those images must follow a specific path each image beside another one like a train.

is there any solution than looping.

what i wanna exactly is those image move simultaneously.

Abdel Ali
  • 1
  • 1

1 Answers1

2

You want to use a CAKeyFrameAnimation, using a CGPath to describe the path you want your objects to follow.

You would create a series of animations, each using the same path, but with different beginTimes. The tricky bit is how to use beginTime. You want to set each animation to a time in the future using code like this:

anAnimation.beginTime = CACurrentMediaTime()+delay;

When an animation is part of a group, beginTime is expressed as a number of seconds from the start of the group animation. You can't group animations on different layers, though, so you need to start each animation independently. To do that, you set beginTime to a time starting from CACurrentMediaTime().

Duncan C
  • 128,072
  • 22
  • 173
  • 272
  • firstly thanks for you're reply, the main purpose here is how i can use the same layer for each image as you suggest. secondly did you mean on "When an animation is part of a group" that i've to use group animation – Abdel Ali Apr 24 '12 at 11:49