KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to respond to touch events (specifically UIControlEventTouchUpInside and UIControlEventTouchUpOutside ) on a UITextField , but the only event that comes through is UIControlEventTouchCancel . I can't use UIControlEventEditingDidBegin , because it only occurs when field gains focus, which is not what I'm trying to detect. I want to know when the user lifts their finger, and whether it was inside or outside the text field, regardless of current focus state. Does anyone know a way to accomplish this? To be clear I've tried using addTarget:action:forControlEvents and it does not work . The touch up event is prevented by the cancel. I want a way to detect the touch up before the UITextField consumes it and produces the Cancel event. Also, I'd like to avoid creating any extra views if possible.
Tags (comma-separated)
Save Edits
Cancel