UIScrollView with an imageview detecting touch
I have a UIScrollView and inside that one image view. The imageview must draw on response to user touches on the image view. But it must scroll and zoom the image on swipe and pinch gesture. How can i enable b开发者_开发问答oth these functionalities at the same time.
You have to implement UIScrollViewDelegate
-(UIView*)viewForZoomingInScrollView:(UIScrollView*)scrollView
And enable user interaction on your UIImageView
imageView.userInteractionEnabled = YES;
Then to detect swipes you can use UISwipeGestureRecognizer.
精彩评论