13

I would like to implement a timeline, much like one you can find in iMovie or Final Cut, which you can scroll in either direction. Scrolling to the left would go back in time ( months ) and scrolling to the right would go forward in time, creating a smooth continues path.

What would be the best way to implement this?

  • Do tricky things with UIScrollView
  • Subclass UIView and try to re-create inertial scrolling

A disadvantage of recreating the inertial scrolling is if Apple ever decides to change it that my app will feel weird. I personally do not like it when an app does not feel system integrated, this includes games like tower madness where they made their own scrollview which works really bad and feels wrong.

Antwan van Houdt
  • 6,989
  • 1
  • 29
  • 52
  • Please do not add an answer that says "just make it extremely big; users won't scroll that far." They will. Also, that is not infinite. It may be near infinite, but it's not infinite. –  Nov 07 '11 at 22:58

2 Answers2

30

Apple has and example project featuring infinite scrolling it's called StreetScroller, the description says:

Demonstrates how a UIScrollView subclass can scroll infinitely in the horizontal direction.

I hope this helps you.

3lvis
  • 4,190
  • 1
  • 30
  • 35
2

StreetScroller can only support no paging mode. I wrote a class based on the StreetScroller and support paging & no paging at the same time. https://github.com/hellohalo/InfiniteScrollView