views:

282

answers:

1

I have UIScrollView with multiple UIVIew subviews. I would like to update the data that is displayed by each UIView when they appear in the visible portion of the UIScrollView.

What is the callback that gets triggered? I tried viewWillAppear, but it does not seem to get called.

Thanks. :)

+4  A: 

You have to do the calculation yourself. Implement scrollViewDidScroll: in your scroll view delegate and calculate manually which views are visible (e.g. by checking if CGRectIntersectsRect(scrollView.bounds, subview.frame) returns true.

Ole Begemann
Alright, for some reason I was under the impression that there was a built in callback. Thanks.
nan