1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Rect Is Visible?

Discussion in 'iPhone/iPad Programming' started by Molten, Nov 4, 2009.

  1. macrumors newbie

    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 :)
  2. macrumors newbie

    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)

Share This Page