简体   繁体   中英

iOS: App-specific Auto Complete Text Predict/Suggestions

I've noticed that when I send someone a text, if I'm typing something similar to what I've typed before, my phone will suggest things I've typed more often. Is there a way to have similar functionality but app-specific? Say I have a grocery list app and I usually prefer "granny smith apples." If I start typing apple I'd like to have an autocomplete suggestion with "granny smith apple." In my research I've come across UITextChecker, but it says that's strictly for spell checking. And I believe UILexicon can only be used if you make a custom keyboard. Would that accomplish what I'm looking to do?

You can use UILexicon which will match the user input - it offers auto correction and suggestions - You will have to modify the entries. You have to do it yourself with your own UI and is considered supplementary.

https://developer.apple.com/documentation/uikit/uilexicon

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM