In my app, I have small views that can be moved around by dragging them. When the user begins dragging on one of the small views, it stays in place, but is 'stretched' for a certain distance (~200 points). After the distance is exceeded, then the small view should perform a 'snap' effect to the user's finger. The whole animation is best described as a rubber band breaking.
So far, I've implemented the snap effect like so:
UISnapBehavior *snapBehavior = [[UISnapBehavior alloc] initWithItem:iconView snapToPoint:[[touches anyObject] locationInView:self.view]];
[self.snapAnimator addBehavior:snapBehavior];
The problem is, if the user continues moving their finger while the snap animation is being performed, the view continues to move towards the point where the finger was when the effect began.
Is there any way to update UISnapBehavior's destination when touches are moved?