I thought UIControlEventTouchCancel is triggered when I tap on a button and then drag out of it. But I’m doing exactly that and my event handler is never called.
I have a class that inherits from UIControl and I’m doing this in the init:
[self addTarget:self action:@selector(onTouchCancel)forControlEvents:UIControlEventTouchCancel];
How do I trigger the cancel event?
Thanks for your help!
Use “UIControlEventTouchUpOutside” if you want an event when the finger is outside the bounds of the control.