How to figure out if two CGRect intersect?

Posted by mystify on Stack Overflow See other posts from Stack Overflow or by mystify
Published on 2010-04-26T14:10:42Z Indexed on 2010/04/26 14:13 UTC
Read the original article Hit count: 156

Filed under:

In -drawRect: I want to check if the provided rect intersects with anotherRect.

I'm not good at this geometry math stuff and especially at english so what I want to say is:

If you have two sheets of paper on the desk, and one of them covers the other either completely or just a small portion, it is rectsIntersect = YES.

How to check that out for rect and anotherRect?

© Stack Overflow or respective owner

Related posts about iphone