开发者

Executing code when the scrollview swipes

开发者 https://www.devze.com 2023-02-13 12:01 出处:网络
How ca开发者_开发知识库n code be linked to the swipes of a UIScrollView? If the user swipes left I would like to decrement a counter and vice versa.If your counter value is tied to contents offset th

How ca开发者_开发知识库n code be linked to the swipes of a UIScrollView?

If the user swipes left I would like to decrement a counter and vice versa.


If your counter value is tied to contents offset then you can set UIScrollView's delegate and implement scrollViewDidScroll: method in it. There you can check contentOffset value and change your counter accordingly.

0

精彩评论

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