1

Possible Duplicate:
How to create a UIScrollView of infinite scrolling?

I'm trying to get a UIScrollView to infinitely scroll vertically and wrap around its contents, in this case a multiline UILabel. (For displaying credits)

I thought it would be a simple case of resetting the offset when at the bottom to the top again to give the illusion that it's scrolling forever.

I tried doing this by using setContentOffset of a UIScrollView inside scrollViewDidScroll, but the problem is that the velocity of the scroll comes to a dead stop when I set the content offset which kills the seamless effect.

Any idea what I'm missing, or if there's a better way of doing this?

Thanks.

Community
  • 1
  • 1
ribbonwind
  • 53
  • 1
  • 1
  • 5
  • I used that before and it's the same story. I'd also like to replace the UILabel with a UIView later. Either way they're both UIScrollViews. – ribbonwind Sep 05 '11 at 13:24
  • There is a GREAT video from WWDC 2011 on infinite scrolling. I think it was called Advanced ScrollView Techniques. You should be able to get to it through developer.apple.com. – Mike Hay Sep 05 '11 at 14:35
  • I wasn't aware of that, thanks. It seems I'm already doing what they describe, except when I call setContentOffset the velocity of my scroll does not continue, it just haults. In their developer video the velocity continues so their seamless effect works. I can't find their sample project either :( – ribbonwind Sep 05 '11 at 15:14
  • Actually I think I found it, called "StreetScroller". The code is different from the video however, and actually it suffers the same problem that I have - if you do a big swipe, as soon as setContentOffset is called even the sample goes crazy :( – ribbonwind Sep 05 '11 at 15:49

0 Answers0