iphone - How do I really know when a UIButton has been released? -
I am running on an issue where I have a UIButton in which I want to track press / release events so I I'm attacking touch-down / touch-up events. Unfortunately, in some cases this will not track the touch up event - for example, if a warning pops up.
- (IBAction) Button: (ID) sender; - (IBAction) Button: (ID) sender;
How do I ensure that the view controller is notified when the button gets pushed / normalized, what is the reason for any reason?
You must also track the touch cancel event. Should do this.
Edit: Hmmm, what about UIControlEventAllTouchEvents
? You have to add it programmatically. I'm really surprised that it was not canceled. You can also try to cancel the - (zero) touch: (NSSet *) touches the event: (UIEvent *) Event
in your UIViewController
[myButton addTarget: self action: @Silterar (for all tactics) control events: UCentral eventsAlatouvents];
Great
Comments
Post a Comment