Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone UIScrollView, Slow down the scrolling

How do I add some extra drag to the UIScrollView physics. It scrolls just a little too fast for what I am doing. (I don't want to disable altogether, I still like the rubber band effect when you get to the end or beginning of the view.) Is there any way to slow it down?

like image 357
Katy Avatar asked Nov 29 '22 19:11

Katy


2 Answers

Actually, after reading the Documentation I discovered the property for UIScrollView that slows down the scrolling, so Apple does make this readily available for anyone else looking for this:

scrollView.decelerationRate = UIScrollViewDecelerationRateFast;

Even though it says fast, it is speeding up deceleration which in effect slows the scrolling down. This was exactly what I needed. And no worry of patents. :)

like image 178
Katy Avatar answered Dec 24 '22 18:12

Katy


Actually you can make block animation with ScrollToRowAtIndexPath:... with animated set to NO. This way block animation will animate underlaying variables manually using selected time.

like image 35
Krzysztof Zabłocki Avatar answered Dec 24 '22 20:12

Krzysztof Zabłocki