I have a scroll view (shown in the picture below). It allows the user to jump/navigate between various sections in my ap开发者_开发知识库p. The number of sections varies between 20 to 40 (which is pretty large). The speed of the scroll should depend on the speed with which the user swipes/scrolls on the view. I thought of doing this operation by using the contentOffSet
property of scrollview
, but didn't do it as it might decrease the usability of this feature.
1-How can I control the speed of the scroll view?
2-Can I do this operation with out the help of content offset property?
I would recommend using UIPanGestureRecognizer
on your custom view and use velocityInView
:
If that doesn't cut your need, do your own customized calculation by listening to UIGestureRecognizerStateChanged
精彩评论