Is there a delegate call when changing the language of the iOS keyboard?

I have a scenario in which I would like to have a handler that starts when the user clicks on a language change (globe icon) on the keyboard for iOS.

How can i achieve this?

thank

+5
source share
1 answer

The following should work: You will need to use the UIKeyboard notification in your code

   [[NSNotificationCenter defaultCenter] addObserver:self
             selector:@selector(keyboardWillBeHidden:)
             name:UIKeyboardWillHideNotification object:nil];

Then, in your method keyboardWillBeHidden:or similarly, use the answer (link below) that returns you the two-letter code for the currently selected language.

Link: Getting the current device language in iOS?

, keyboardWillBeHidden: , , .

, , .

+2

All Articles