Determine if a subview is visible in a UIScrollView

Posted by Jools on Stack Overflow See other posts from Stack Overflow or by Jools
Published on 2010-06-10T06:27:03Z Indexed on 2010/06/10 6:32 UTC
Read the original article Hit count: 192

Filed under:
|

Hi all,

I've added a view to my app, that contains a UIScrollView, with a number of UITextViews in it's content view. This works perfectly on OS 3.0 and up, but when I test it on my 2.2.1 iPod touch, there is a UITextView bug that stops any text views automatically updating their content when they are scrolled into view - so you have to send them the setNeedsDisplay message.

However, I only want to do this when they start to become visible during the scroll - how do I determine, in the UIScrollView's scrollViewDidScroll delegate method, whether a UITextView is visible in the UIScrollView's frame?

Ta. Jools.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiscrollview