开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜