Reputation: 753
I have two UIButtons on the base, that on click of a third UIButton move to specific positions (These positions are generated on application of a complex algorithm). To move them , I am using animateWithDuration:delay:options. When I was making a different application, I was moving UIButtons randomly around the screen using NSTimers so detection of a collision was easy with a simple CGRectIntersectsRect. I have two options: 1. Is it possible to detect their collision with each other if Im moving them using animateWithDuration? 2. If I use NSTimers, I would be able to detect collsion but in that case, how do I move them to a particular position on the screen? Any help would be appreciated!
Upvotes: 2
Views: 281
Reputation: 9740
check out the link detect collision of two moving buttons in iPhone
Upvotes: 1