【iOS】TouchDown、TouchDownRepeat 和 TouchCancel 的区别

TouchDown:在控件窗口内单点触摸按下

TouchDownRepeat:在控件窗口内多点触摸按下(即点触计数大于1)

TouchCancel:在控件窗口内因为系统事件将当前所有触摸取消(如手机被锁屏、有电话呼入)


[依据] 来自Apple官方文档 UIControlEvents

UIControlEventTouchDown:A touch-down event in the control.

UIControlEventTouchDownRepeatA repeated touch-down event in the control; for this event the value of the UITouch tapCount method is greater than one.

UIControlEventTouchCancel:A system event canceling the current touches for the control.

【iOS】Touch Drag Inside 和 Touch Drag Outside、Touch Drag Enter、Touch Drag Exit的区别

Touch Drag Inside:手指在控件窗口内拖动

Touch Drag Outside:手指在控件窗口外拖动

Touch Drag Enter:手指从控件窗口外部拖动到内部

Touch Drag Exit:手指从控件窗口内部拖动到外部


[依据] 来自Apple官方文档 UIControlEvents

UIControlEventTouchDragInside:An event where a finger is dragged inside the bounds of the control.

UIControlEventTouchDragOutside:An event where a finger is dragged just outside the bounds of the control.

UIControlEventTouchDragEnter:An event where a finger is dragged into the bounds of the control.

UIControlEventTouchDragExit:An event where a finger is dragged from within a control to outside its bounds.

【iOS】Touch Up Inside 和 Touch Up Outside 的区别

Touch Up Inside:按下按钮,并且在按钮内部(inside)松手

Touch Up Outside:按下按钮,并且在按钮外部(outside)松手


[依据] 来自Apple官方文档 UIControlEvents

UIControlEventTouchUpInside:A touch-up event in the control where the finger is inside the bounds of the control.

UIControlEventTouchUpOutside:A touch-up event in the control where the finger is outside the bounds of the control.