0

How do I know, how much keyboards enabled into my iPhone keyboard settings.

Even if user downloaded other custom keyboard from app store, still I want in list programmatically.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Sunil Targe
  • 7,251
  • 5
  • 49
  • 80

2 Answers2

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

NSLog(@"List of all keyboards : %@",keyboards);
Fahim Parkar
  • 30,974
  • 45
  • 160
  • 276
Sunil Targe
  • 7,251
  • 5
  • 49
  • 80
0

You can ask current first responder (UITextField, UISearchBar, etc.).

// assume you have instance variable pointing to search bar currently entering

UITextInputMode *inputMode = [self.searchBar textInputMode];
NSString *lang = inputMode.primaryLanguage;
Ahmed Abdallah
  • 2,338
  • 1
  • 19
  • 30