1

My UITextView delegate is set to detect any changes and forward them to a parser. However, the shouldChangeTextInRange doesn't fire up on delete key in simulator. textDidChange acts normally.

AFAIK, the forward delete should be available on iOS using an external keyboard, but the documentation I can find online is a bit hazy.

I have found some hacky ways of doing it, but they are old and don't seem to work all the time. Here's one example: How to detect delete key on an UITextField in iOS 8?

Is there an official way to detect changes using forward delete, and why on earth wouldn't the appropriate method be called in this case?

EDIT:

Here's another thread discussing the matter and naming it as a bug:
Delete (not Backspace) doesn't fire UITextViewDelegate's shouldChangeTextInRange

There is no official notification anywhere that forward deletion would be deprecated, but apparently forward deletions can't be undone either, so perhaps it's really not possible on any device using any keyboard anymore?

Tritonal
  • 607
  • 4
  • 16
  • 1
    I also saw this behavior but I don't have a solution for this. I was just wondering, if this is also relevant for iOS apps running on macOS now. Did anybody check this? – mixable Dec 01 '20 at 21:26

0 Answers0