I'm seeing a glitch in a UITextField when you tap on the clear button (the little X). Immediately before the text disappears, the selection carets appear (the vertical lines you move to select text) and then the text highlights as if it were selected. This only happens for an instant -- the highlight and carets flash on then immediately go away. The text does, in fact, clear -- the problem is that it's a distracting visual glitch.
Has anyone seen this?
Related question: Is there a notification posted or delegate method called somewhere when text is highlighted? I could use that to detect the flash. But, I can't seem to find anything...
I also experienced this issue, on iOS8. My class is observing
UITextFieldTextDidChangeNotification
. Although I didn't find the explanation of WHY it's happening I found the followingUITextField
delegate fixed it for me:Just nil the textfield text on 'clear' - takes care of the visual glitch.