我有UIScrollView内的UIView。当我想模拟UIView上的拖动事件时,UIScrollView上的滑动事件正在触发。ios模拟器:模拟滑动和拖动
根据documentation,滑动和拖动之间没有太大区别。
刷卡
1- Place the pointer at the start position.
2- Hold the mouse button.
3- Move the pointer in the swipe direction and release the mouse button.
将
1- Place the pointer at the start position.
2- Hold down the mouse button.
3- Move the pointer in the drag direction.
在iPad上我可以用两个手指轻扫2和一个手指拖动。现在,我该如何在模拟器上做类似的事情;拖动而不是刷卡?
编辑1: 我应该先清楚一点。无论如何,我的问题是,鼠标拖动触发滑动而不是拖动,从而滚动滚动视图,而不是将拖动事件传递给滚动视图所包含的UIView。 我在MacBook Pro上。触摸板上的两根手指滑动被忽略。触摸和拖动导致与鼠标拖动相同的事情。 谢谢
可能吗? –
@Marek触摸板不是很有帮助。两根手指轻扫被忽略,没有任何反应。保持并拖动导致与鼠标拖动相同的效果。我已经更新了这个问题。 – Srisa
嗯手势和scrollView有问题,因为它首先接收事件...如果你真的想这样做,我认为你应该重写hitTest:withEvent:并检查哪个视图有事件并传递给它 –