PDA

View Full Version : Stopping image at 'pos' position. Again




rocky612
Feb 28, 2009, 07:16 AM
Hi!
I know there was such topic. (http://forums.macrumors.com/showthread.php?p=6156679#post6156679) but there's no answer.
the problem is I need to know the current position of animated CALayer, while it's moving from point A to Point B. i don't know how to get it:confused:. is it possible? are there any solutions?

Please help!



Jeremy1026
Feb 28, 2009, 08:57 AM
Hi!
I know there was such topic. (http://forums.macrumors.com/showthread.php?p=6156679#post6156679) but there's no answer.
the problem is I need to know the current position of animated CALayer, while it's moving from point A to Point B. i don't know how to get it:confused:. is it possible? are there any solutions?

Please help!

No, as soon as the item begins its animation its coordinates are set to the ending location. There is no way to track its location as it moves using a single Core Animation translation. You could however, do a short animation and repeat it until it gets to its final location, that way you will know the item is at (0,20), (20,20), (40,20), (60,20) etc.

rocky612
Mar 4, 2009, 11:00 AM
i understand. thank you!!!:)