When the user manually scrolls through my UIScrollView, the scrollViewDidScroll method of my delegate gets called repeatedly during the animation, with newly updated values of the contentOffset.
When I call "[scrollView setContentOffset:320 animated:YES", then the delegate method gets called in the same way.
I decided that the normal scroll speed is too fast for the user experience, so enclosed a "[scrollView setContentOffset:320]" in an "animatedWithDuration:" block, as Apple recommends in the UIView class reference.
But... now my scrollViewDidScroll method gets called only once at the beginning of the animation with the final value, and not during the animation anymore. I get the same effect when I use the old "beginAnimations:" methods instead.
So... anybody knows how to solve this?
By the way, the "setContentOffset" method of the UIScrollView shows the same behaviour. It used to be called during the animations, and now is called only once.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…