【发布时间】:2016-04-25 06:56:35
【问题描述】:
我必须一次在我的imageview 上执行所有手势,这意味着用户可以在双击时一次单击移动imageview,也可以进行缩放和旋转。现在我发现这种方法可以执行多个手势但无法执行缩放和旋转。
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
在我被应用 UIPinchGestureRecognizer,UIRotationGestureRecognizer 和 UIPanGestureRecognizer 之前,它一次只能处理一个手势。请帮我解决这个问题,或者如果可能的话给我任何其他更好的选择。
【问题讨论】:
-
这可能会有所帮助*.com/questions/36787393/…
-
@EI Captain 就我而言 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer 方法在任何多点触摸上都没有被调用,当这个方法被调用时,你能建议我吗?
-
你必须添加手势 [view addGestureRecognizer:longPress];
-
@EI Captain 仍然没有得到我想要的。
标签: ios objective-c uigesturerecognizer multi-touch