ios - How to use auto Correction view for custom key-board extention ios8? -
how implement auto correction in custom keyboard in ios 8? have created custom keyboard not able auto correction in custom keyboard. please help!!
although have not tried creating custom keyboard, basing reply on can see in documentation.
in keyboard, create property called entries of type [anyobject] (array of anyobjects).
in init method, or wherever create keyboard, phone call method:
requestsupplementarylexiconwithcompletion(completionhandler: { lexicon in self.entries = lexicon.entries })
i suspect entries array of strings or nsstrings, dictionary or other type. when testing out, seek figuring out type contained in entries before figuring out logic.
i not believe there way apple's default autocorrect options currently. however, wwdc talk gives insight how made autocorrect work in original iphone os (around 30 min mark).
he mentions using binary search of array, leads me believe array sorted. of course, much have changed since first iphone came out...
good luck figuring out new api!
ios objective-c iphone
No comments:
Post a Comment