0

I know you can subscribe to the selectedTextRange with KVO to determine when the cursor changes in UITextField so that when I click a different location, the cursor changes and the event is fired.

BUT if I click on the same exact cursor position, it doesn't trigger this event (because I guess selectedTextRange is not actually being set, its remaining the same). How do I detect when they click on the exact same cursor spot or rather when a keystroke is happening but the cursor position does not change. Not a text change but a 'non-cursor change'.

Thank you!

Adam Dunmars
  • 361
  • 1
  • 11
  • 1
    I think this will help solve your problem. https://stackoverflow.com/questions/15814697/uitapgesturerecognizer-tap-on-self-view-but-ignore-subviews You need to use the gesture delegate and some logic to decide if the touch was a no change touch or not. – skaak Nov 06 '20 at 11:42
  • This may also help: https://stackoverflow.com/questions/10045095/how-to-get-uitextfield-tap-event – koen Nov 06 '20 at 12:51

0 Answers0