iPhone how to translate layer via custom path?

143 views Asked by At

I have made CAlayer that contains an image. What i basically want to do is to translate this image to new location, but not by using simple straight forward path, but i want to move image to that location by using circular path.

I cant use rotation animation in layer, because image will be shifted a little bit side ways, and thats not i want. For example if i make rotation by 180 deg, image will be at location that i want, but bottom and top will be reversed, image will be upside down.

Is there any way i can translate image via custom path?

P.S If my question sound a little confusing, i'll try to be more precise.

1

There are 1 answers

0
Marcelo Alves On BEST ANSWER

Try the CAKeyframeAnimation class. There's a path property, where you can set a CGPathRef to do the translation.