I have implemented a scrollview, which holds multiple copies of a custom view. The custom views contain a UIPanGestureRecoginixer that I use to swipe them to the left (to delete them). When I attempt to scroll vertically, scrolling doesn't occur if I'm touching inside of the CustomView. However if I set up the subViews and the scrollviews content size so that it scrolls horizontally this issue doesn't occur. How can I force the scrollview to scroll horizontally even if I'm touching inside of a subview?
1 Answers
1
votes
Try to set the UIPanGestureRecoginzer's delegate and implement
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
It requires you to return a BOOL value. When you return YES, the otherGestureRecognizer will be recognized simultaneous.