First here best Source Code
It could be that whatever is setting those numbers in there, is not greatly impressed by you setting the contentOffset
under its hands. So it just goes on setting what it thinks should be the contentOffset for the next instant - without verifying if the contentOffset has changed in the meantime.
I would subclass UIScrollView
and put the magic in the setContentOffset
method. In my experience all content-offset changing passes through that method, even the content-offset changing induced by the internal scrolling. Just do [super setContentOffset
:..] at some point to pass the message on to the real UIScrollView
.
Maybe if you put your shifting action in there it will work better. You could at least detect the 3000-off setting of contentOffset
, and fix it before passing the message on. If you would also override the contentOffset method, you could try and see if you can make a virtual infinite content size, and reduce that to real proportions "under the hood".
This is also helpful for you..!!!