Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 向自定义键盘添加建议_Ios_Xcode_Swift_Ios8 - Fatal编程技术网

Ios 向自定义键盘添加建议

Ios 向自定义键盘添加建议,ios,xcode,swift,ios8,Ios,Xcode,Swift,Ios8,我使用自定义键盘 我想知道我是如何在键盘上添加建议的,我看到了一些关于这个问题的问题,没有人会得到答案,不管你是否能得到帮助,甚至是如何去做 -(void)isDictionaryWord:(NSString*)word { UITextChecker *checker = [[UITextChecker alloc] init]; NSLocale *currentLocale = [NSLocale currentLocale]; NSString *currentLanguage

我使用自定义键盘 我想知道我是如何在键盘上添加建议的,我看到了一些关于这个问题的问题,没有人会得到答案,不管你是否能得到帮助,甚至是如何去做

-(void)isDictionaryWord:(NSString*)word {   

UITextChecker *checker = [[UITextChecker alloc] init];
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *currentLanguage = [currentLocale objectForKey:NSLocaleLanguageCode];
NSRange searchRange = NSMakeRange(0, word.length);    
arrPredectiveText=[checker completionsForPartialWordRange:searchRange inString:word language:currentLanguage];  

}

也请阅读这篇文章

谢谢你的回答:)我很高兴你能多解释一下如何将它集成到我的键盘上。这里有代码,我不能将我的键盘零知识与swift结合起来,对不起,兄弟,你是怎么做到的?任何语言对我都适用?你是问还是说?