当用户在我的应用程序中点击并按住 UIButton 时,会触发 UIControlEventTouchCancel 事件。UIControl 的 Apple 文档没有关于此事件的任何详细说明。为什么会触发?这有什么用途?
[button addTarget:key action:@selector(keyUp:) forControlEvents:UIControlEventTouchUpInside];
[button addTarget:key action:@selector(keyUp:) forControlEvents:UIControlEventTouchUpOutside];
[button addTarget:key action:@selector(keyCancel:) forControlEvents:UIControlEventTouchCancel];
[button addTarget:key action:@selector(keyDown:) forControlEvents:UIControlEventTouchDown];