开发者

UIScrollView decelerationRate with pagingEnabled

开发者 https://www.devze.com 2023-02-18 08:08 出处:网络
UISc开发者_如何学运维rollView has a decelerationRate property that can be used to modify, well, the deceleration rate of a scroll view. But it’s not taken into account when pagingEnabled = YES. Whate

UISc开发者_如何学运维rollView has a decelerationRate property that can be used to modify, well, the deceleration rate of a scroll view. But it’s not taken into account when pagingEnabled = YES. Whatever the deceleration rate, it has the same speed. Does somebody have a solution?


I know this question is old, but here's a solution I found.

I had to set pagingEnabled = NO and manually implement the paging functionality. If you have a UIScrollView with pagingEnabled = YES, then setting the decelerationRate property will not have any effect on the speed of the paging (as you've found out).

0

精彩评论

暂无评论...
验证码 换一张
取 消