From the documentation, it seems that UILexicon will help you create your own auto- UILexicon , UILexicon has a bunch of UILexiconEntry entries containing String strings, the record contains the userInput string, which I assume it is supposed to be the user entered, and documentText , which I assume is the one what you should replace with this input. You use func requestSupplementaryLexiconWithCompletion(_ completionHandler: ((UILexicon!) -> Void)!) From the UIInputViewController to get this UILexicon.
I assume that the UIInputViewController knows what was written in documentProxy, since it is a relay of these messages, and this is how it knows what the user is typing, and instead of typing in UILexicon ..
This is what I collected by reading the documentation, I did not test it, although it is not worth checking.
I hope this helps
Daniel
source share