views:

128

answers:

0

HI

I have 10 imageviews moving around on my screen. when any 2 images overlap or collide i need to handle the collision.

i cannot use CGRectIntersectsRect(image1.frame, image2.frame) as i wont know at run time which 2 images out of 10 collided. i need to know which images participated in the collision. Based on this i should write some functionality.

The alternate that i could think of was to check each image with the other 9 images if a collision has occurred. but i'm sure that there can be a much much better way to get the desired result.

can someone help me out with this?

Thanks & Regards, NR