问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/4974631/change-the-gravity-on-a-uiscrollview-with-paging