IPhone: CGRectIntersectsRect ()
When you use CGRectIntersectsRect (), you get a CGrect, which is the intersection of both rectanlges, so based on the area of that rectangle, you can get if it's more than 50%.
Something like that:
CGrect *interRect = CGRectIntersection(rect1, rect2); if ((interRect.size. width * interRect.size.height) > (rect2.size. width * rect2.size.height*0.5) return Yes;
I am multiplying the width * height to get the area of the rectangle.
source to share