How to detect collision of two images? [duplicate]
Possible Duplicate:
How to generate an end screen when two images collide?
how to generate an end screen when two images collide. I am ma开发者_运维问答king an app with a stickman you move with a very sensitive acceremeter. SO if it hits these spikes, (UIImages) it will generate the end screen. How do I make the app detect this collision and then generate an end screen.
if (CGRectIntersectsRect(imageView1.frame, imageView2.frame)) {
// Do whatever it is you need to do.
}
精彩评论