UIControlEventTouchDragOutside和UIControlEventTouchDragExit之间有什么区别? [英] Where's the difference between UIControlEventTouchDragOutside and UIControlEventTouchDragExit?

查看:129
本文介绍了UIControlEventTouchDragOutside和UIControlEventTouchDragExit之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两者似乎具有完全相同的效果。当手指距离控件足够远时,它们都会出现。 界限实际上并不是UIControlEventTouchDragExit的标准。只有在距离足够远的情况下,它才会被触发...

Both appear to have the exact same effect. They come both when the finger is far enough away from the control. The "bounds" is not really the criteria for UIControlEventTouchDragExit. It gets fired only if it's far away enough...

推荐答案

UIControlEventTouchDragOutside

UIControlEventTouchDragExit
一个事件,其中手指被拖动到控件的边界之外

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

听起来像UIControlEventTouchDragOutside会在用户触摸边界之外时触发,无论手指是否在边界内。 UIControlEventTouchDragExit仅在手指从边界内拖动到边界外时触发。

It sounds like with UIControlEventTouchDragOutside is fired when the user touches just outside the bounds, regardless of whether or not the finger was ever within the bounds. UIControlEventTouchDragExit is only fired when the finger is dragged from within the bounds to outside the bounds.

因此,在调整控件大小时将使用UIControlEventTouchDragOutside(边缘点击,然后拖动) ),而UIControlEventTouchDragExit将用于移动控件(在其中点击并拖动)。

So, UIControlEventTouchDragOutside would be used when resizing a control (an edge tap, then drag), whereas UIControlEventTouchDragExit would be used to move the control around (tap inside and drag).

这篇关于UIControlEventTouchDragOutside和UIControlEventTouchDragExit之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆