我正在开发一个 ios 8 自定义键盘应用程序。我想在该应用扩展中添加预测栏和自动更正。为此,我已经实现了 UILexicon 类。我的代码是我在 Keyboard 类的 viewDidLoad 方法中编写的:
[self requestSupplementaryLexiconWithCompletion:^(UILexicon *lexicon1){
lexicon = lexicon1; // lexicon is a global object which i have declare in file
}];
//for checking this i have done :
for(int i = 0 ; i<[[lexicon entries] count] ; i++){
UILexiconEntry *lexiconEntry = [[lexicon entries] objectAtIndex:i];
NSLog(@"Lexicon entry user input is the : %@" , lexiconEntry.userInput);
NSLog(@"Lexicon entry document text proxy is the : %@" , lexiconEntry.documentText);
}
但它每次打印都保存在我们的手机中。除了这些之外,没有任何预测和自动更正。你知道我们该如何处理这件事吗?