简体   繁体   English

uibutton的触摸事件结束

[英]event for touches ended for a uibutton

I have a button which i drags using the code: 我有一个使用代码拖动的按钮:


[myButton addTarget:self action:@selector(dragged:withEvent:) forControlEvents:UIControlEventTouchDragInside];

is there any controlEvent that can be used as touches ended. 是否有任何controlEvent可以用作结束触摸。

我认为您在寻找: UIControlEventTouchUpInside和/或UIControlEventTouchUpOutside

Set BOTH touchUpInside and touchUpOutside events. 设置touchUpInside和touchUpOutside事件。

Check them out here: Control Events 在此处查看它们: 控制事件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM