UIButton事件。有什么不同? [英] UIButton events. What's the difference?
问题描述
我遇到了一个问题,我的按钮应该保持按下,同时它显示从它调用的弹出窗口。 Popover是一些过滤器的选择器,过滤器显示在按钮本身上。当我点击它并显示弹出窗口时,无论如何都会取消选择。
I've encountered a problem where my button should remain "pressed down" while it shows popover called from it. Popover is selector for some filter and filter is shown on button itself. When I tap on it and it shows popover it becomes deselected no matter what.
我认为我必须重新定义它在触摸事件上的行为并使其不响应标准在
内修改。然后我想知道其他事件的责任是什么?但是我在iOS库中找不到事件列表,而在StackOverflow中只有关于错误行为的问题
或触地
。
I think I have to redefine it's behavior on touch event and make it respond not to standart touch up inside
. Then I wondered what are other events responsible for? But I couldn't find events list in iOS library and in StackOverflow are only questions about incorrect behavior of touch up inside
or touch down
.
那么触摸事件之间有什么区别?
So what's the difference betweeen touch events?
- 触摸取消 - 当您触摸按钮但移开手指并且
它仍然被取消选择? - 触地 - 右键点击。
- 触地重复?
- 触摸拖动输入??
- 触摸拖动退出?
- 触摸内拖?
- 触摸外面?
- 内部触摸 - 当你点击并释放剩余的按钮时,
界限。它将UIButton状态更改为正常。 - 在外面触摸 - 当你点击并释放按钮时,它的
界限?
- touch cancel - when you touch button but move your finger away and it remains deselected?
- touch down - right on tap.
- touch down repeat ??
- touch drag enter ??
- touch drag exit ??
- touch drag inside ??
- touch drag outside ??
- touch up inside - when you tap and release button remaining in it's bounds . It changes UIButtons state to Normal.
- touch up outside - when you tap and release button leaving it's bounds ?
其他IBActions不是由UIButton发送的,对吗?
这些事件如何改变UIButton的外观?喜欢突出显示
或选择
?
other IBActions are not sent by UIButton, right?
Also how those events change UIButton's appearance? Like highlighted
or selected
?
我很感激关于IBActions的好文章的链接,因为我找不到它。
I'd appreciate a link on good article about IBActions, because I couldn't find it.
推荐答案
来自商店图书馆:
-
UIControlEventTouchCancel
系统事件取消控件的当前触摸。
A system event canceling the current touches for the control.
UIControlEventTouchDown
控件中的触碰事件。
UIControlEventTouchDownRepeat
控件中的重复触碰事件;对于此事件,UITouch tapCount方法的值大于1.
A repeated touch-down event in the control; for this event the value of the UITouch tapCount method is greater than one.
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.
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.
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.
这篇关于UIButton事件。有什么不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!