Friday 15 August 2014

animation - constraining drag move along a path in iphone -


I am making an app in which the balls are rolled onto the tracks.
When we touch and drag the balls around the screen, they should proceed with the tracks if the drag is too far from the track, then it should be closed. Tracks can be any size what is the best appraoch ..?

It depends on how the track is defined in the program, but it is a CGPath Found that can show it, or create one, the experiment can use CGPathContainsPoint in the touch method and if it is outside the path, then refuse to update the position of the ball.


No comments:

Post a Comment