简体   繁体   中英

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.

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

Set BOTH touchUpInside and touchUpOutside events.

Check them out here: Control Events

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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