开发者

ScrollView scrolling speed

In my app, I have 2 ScrollView s in view.first scroll is placed bottom and then second Scroll placed. if i scroll either first or second both will scroll depends on finger movements. this is working.

But my question is, what if I want the scrolling speed to be different for first scroll and second scroll eg. if the first scroll moves 2px speed then second scroll has to开发者_如何学运维 move double the speed of first scroll i.e 4px.

How can i solve this?


To achieve this, you don't need to work on speed, but on the contentOffset property of the scrollView. You could have a method that sets the contentOffset of other scrollViews based on a sender scrollView.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜