我正在使用此解决方案(/sf/answers/1805084991/)来检测在Settins应用程序(iOS 8)中激活的所有自定义键盘:
- (void)printoutAllActiveKeyboards {
// Array of all active keyboards
NSArray *keyboards = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] objectForKey:@"AppleKeyboards"];
for (NSString *keyboard in keyboards)
NSLog(@"Custom keyboard: %@", keyboard);
}
Run Code Online (Sandbox Code Playgroud)
但这对我的项目来说还不够 - 我需要知道用户当前选择哪个自定义键盘进行文本输入.我有研究stackoverflow和其他资源,但没有找到任何解决方案.有没有办法在我的应用程序中检测当前选择的文本输入中的哪个自定义键盘?
谢谢!