开发者

How to detect collision of two images? [duplicate]

This question already has answers here: Closed 11 years ago.

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.
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜