At present, the UIControlEventTouchDragExit
only triggers when I drag 100 pixels away from the button. I'd like to customize this behavior and bring that range in to around 25 pixels, but I'm relatively new to programming and have never needed to override / customize an in-built method like this.
I've read in some other posts here that I'd need to subclass the UIButton
(or perhaps even UIControl
?), and override -(BOOL) beginTrackingWithTouch: (UITouch *) touch withEvent: (UIEvent *) event
and related methods, but I don't really know where to begin doing so.
Could anyone kindly offer some advice as to how I might achieve this? Much appreciated! ^_^
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…