开发者

uiview animation threading issue

开发者 https://www.devze.com 2022-12-18 09:14 出处:网络
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.

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 an开发者_JAVA技巧y buddy explain how to make them collide at same point using uiview animation. is it the thread processing issue of uiview animation


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];
0

精彩评论

暂无评论...
验证码 换一张
取 消