tags:

views:

993

answers:

3

Since this question was originally asked, UIScrollView deceleration rate customization has been added via the decelerationRate property introduced in OS 3.0.


I have a UIScrollView whose deceleration rate I'd like to change. To be clear, I'm talking about when you swipe your finger on a scroll view and the view continues to scroll (but gradually slows) after you lift your finger. I'd like to increase the deceleration rate so that it stops sooner that it does by default.

I've seen some apps where the UIScrollViews seem to decelerate more quickly. There seems to be no API for this in UIScrollView, but I'm wondering if there's an alternative way to do it.

+2  A: 

No, this is not possible with the SDK and the UIScrollView. You'll have to roll your own scroll view if you want to alter this behavior.

As always, if it's something you'd like to see implemented in the SDK, file a request with Apple.

August
You can still use UIScrollview to do the rendering, just not the touch handling
Airsource Ltd
Done. It hadn't yet occurred to me to file one for this issue, but I've done it for other issues. Doesn't hurt, I guess.
Mike McMaster
A: 

This is possible, but you'd have to subclass UIScrollView and override all the touch handling. It wouldn't be my project of choice - it would take a good bit of work to get it right.

Airsource Ltd
A: 

YES i have successfully changed the decelartion rate by doing the following:

scrollView.decelerationRate = UIScrollViewDecelerationRateFast;
yeahdixon