Executing code when the scrollview swipes
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.
精彩评论