简体   繁体   中英

UIScrollView zoomed won't produce swipe

I have a UIScrollView with zooming enabled, and a swipe gesture recognizer setup. When the user is not zoomed, the swipes come through great, but as soon as the user zooms in, the swipe won't come through.

My swipe recognizer is applied to the imageview, and I have tried to apply it to the scroller also. When zoomed, no go.

Is there a secret to getting the swipe while zoomed?

Thanks in advance!

Rob

Where is your swipe gesture recognizer?

Have you tried setting scrollView setCanCancelContentTouches:NO ?

Is there a secret to getting the swipe while zoomed?

Yes, there is. Each UIImageView should be inside its own UIScrollView which in turn are inside of main UIScrollView. No gesture recognizers are needed, just set UIScrollViews options like zoom scales etc and implement UIScrollViewDelegate methods for master UIScrollView.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM