In my application, I have a view that extends the UIScrollView and populates its contents as the user scrolls. However, if the user scrolls the views filled in inside the UIScrollView too quickly, they are not created in time, and you can really see the background of the UIScrollView. The reason this happens is because I am doing this lazy loading in layoutSubviews does not seem to cause a call every time the contentOffset property is changed.
If you scroll through the UIScrollView slowly, you do not encounter the problem described above, and the content loads quickly enough.
The only solution to this problem that I can think of is to make sure that the UIScrollView does not scroll faster than a certain speed when the user lifts his finger from the screen.
Just so you know that changing the decelerationRate property is not my solution. DecelerationRate tells UIScrollView how quickly it should stop scrolling after the user lifts a finger.
thanks in advance,
Fbr
source share