I have to create a custom UIScrollView containing only 5 labels that would endlessly scroll to imitate a custom control. The label at the centre should change its as well as change another label in a view. This all would look like this:

Any ideas of any framework or implementation of this sort of thing? Thanks in advance!

2 Answers
2

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".

The thing there is, with his implementation, I'm not getting it to be 'looping', that's the case. I've updated the name of the question to be more precise. Anyway, thank you for your answer.
–
SergiusGeeJan 24 '13 at 11:43