使用Paging更改UIScrollView上的“Gravity” [英] Change the 'Gravity' on a UIScrollView with Paging
问题描述
当启用分页滚动 UIScrollView
时,是否可以更改重力(停止速度)?我已实施横向 UIScrollView
,其行为类似于 UIPickerView
。我想根据滑动速度滚动许多项目。谢谢!
Is it possible to change the 'gravity' (stop speed) when scrolling through a UIScrollView
with paging enabled? I've implemented a horizontal UIScrollView
that acts like the UIPickerView
. I want to be able to scroll through many items based on the flick speed. Thanks!
推荐答案
不幸的是,没有简单的属性,你可以更改实现这一点,但你可以使用scrollview委托方法自己的(有点复杂,但可以实现 - 我已经修改表视图,当滚动到结束时捕捉行)。
Unfortunately there's no simple property you can change to achieve this, but you can use the scrollview delegate methods to roll your own (it is somewhat complex, but achievable - I've modified table views to 'snap' to rows when the scrolling comes to an end).
我们必须编写自己的分页实现。
Effectively, you'll have to code your own paging implementation.
这篇关于使用Paging更改UIScrollView上的“Gravity”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!