I have an implementation of UITextInput
that is used to implement note taking with text. We have a custom UIMenuItem
that lists suggested text replacements for a misspelled word that a user can interact with to fix the word. This works well on iPhone and iPad where the only path for changing text is via this menu.
On Mac Catalyst, however, the system also presents text replacement options with the best replacement; and when users attempt to replace text with the menu options provided by the system, our UITextInput
handler seems to only receive a call to setSelectedTextRange:
(the code is in Objective-C). I would expect a call to, for example, replaceRange:WithText:
after an autocorrection is made
Any ideas what could possibly be incorrectly implementing? I.e., how can we receive the text that the system attempts to replace?