Alex Rivera | Logout

Scrolling a horizontal UIScrollView in stepped increments?

Asked 2011-11-23T18:05:44.643
9

I have a UIScrollView that can be scrolled horizontally. The scrollable content is displayed in columns.

Is there a way to make the scrolling only move in stepped increments instead of pixels (i.e. move a column at a time).

Diagram: enter image description here

Edit
Report

1 Answer

1

If you target iOS 5.0, you can use the new UIScrollViewDelegate method scrollViewWillEndDragging:withVelocity:targetContentOffset. This allows you to set the point where the scrolling animation will end after the user has stopped dragging the scroll view.

answered 2011-11-23T19:51:58.793

Your Answer