简体   繁体   中英

overlapping gesture recognizer on UIImageView

I have multiple UIImageView added into the main view, each UiImageView is displayed in its own parent UIView for cropping purpose and each UIImageView is also attached to a PanGestureRecognizer. I am curious on how to implement both pan gesturerecgonizer and also allow image swap by dragging one image (A) to hover over the other image (B) and hold, then the image A and B will be swapped (so A is now displayed in old B's UIView).. this is something like the iphoto app just implemented.

my thought would be somehow create a custom gesture recognizer at the superview layer, but I don't want to lose the pangesturerecognizer applied to each image, how can this be done?

为什么不通过两个手指来启用平移手势,而通过touches方法来实现拖动功能呢?

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