View Full Version : Rect Is Visible?

Nov 4, 2009, 01:14 PM
Hey, I've got a question for you all.

How do i determine whether or not a rect is in my scrollviews 'viewing zone' (bounds?) ?

So i got a big scrollview, and i've got a rectangle in my scrollview. I want a function to start whenever that rectangle is in the view of my scrollview.

really appreciate any help :)

Nov 6, 2009, 03:49 AM
Ok, i figured it out... so easy that i'm embarrassed..

CGRectIntersectsRect( myRect.frame, myScrollview.bounds);

BUT!, this put me in another situation, the bounds of my scrollview doesn't change with zooming. so the intersection will only happen if the original sized bounds intersects.. (upper left corner of my (out)zoomed scrollview)