In my app I have a UIScrollView
and I need to swipe left and right from one picture to the next, but I also need to recognize a scroll.
How do I differentiate between a scroll and a swipe with UIScrollView
?
In my app I have a UIScrollView
and I need to swipe left and right from one picture to the next, but I also need to recognize a scroll.
How do I differentiate between a scroll and a swipe with UIScrollView
?
Look into the UIScrollView
Delegate Methods. ScrollView can detect different types of actions drag etc or add swipeGesture
directly to the scroll view
StackOverflow has questions already on this
iOS: UIScrollView detecting Swipe Gesture
I believe you're actually looking for is an implementation of UIScrollView with Paging, as you do not need to handle the touch events yourself, or determine if they are scrolls or swipes.
The Apple Documentation on Scroll Views and Paging Mode should help you get started