2016-07-24 89 views

回答

0
NSArray *keyboards = [[[NSUserDefaults standardUserDefaults] dictionaryRepresentation] objectForKey:@"AppleKeyboards"]; // Array of all active keyboards 

NSLog(@"List of all keyboards : %@",keyboards); 
+0

似乎並沒有在iOS8上的SIM卡......工作(一iOS8上的設備上沒有檢查),但在工作> = 9個SIM /設備。 –

0

您可以詢問當前的第一響應者(UITextField,UISearchBar等)。

//假設你有實例變量指向搜索欄輸入當前

UITextInputMode *inputMode = [self.searchBar textInputMode]; 
NSString *lang = inputMode.primaryLanguage; 
相關問題