views:

177

answers:

1

i am using two UIView animations to move the two different balls to particular position. But the timing of collision varies. First time they collide but second time first ball come first or viceversa. Can any buddy explain how to make them collide at same point using uiview animation. is it the thread processing issue of uiview animation

+1  A: 

Make sure you're animating the two views in the same block, as in

 [UIView beginAnimations:nil context:nil];
      viewOne.center = CGPointMake(40,40);
      viewTwo.center = CGPointMake(80,40);
 [UIView commitAnimations];
Noah Witherspoon
Thanks for quick replay but the both uiview are using two different blocks of animations. And the points (path) are decided at runtime. But they always cross each other at one point.
Santosh