Skip to content

Instantly share code, notes, and snippets.

@zedzhao
Last active May 26, 2016 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zedzhao/53e2fc4a10e11655ba32c623300666f0 to your computer and use it in GitHub Desktop.
Save zedzhao/53e2fc4a10e11655ba32c623300666f0 to your computer and use it in GitHub Desktop.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(changeInputMode:)
name:UITextInputCurrentInputModeDidChangeNotification object:nil];
- (void)changeInputMode:(NSNotification*)notification
{
NSString *inputMethod = [[UITextInputMode currentInputMode] primaryLanguage]; //判断当前键盘类型, emoji en-US en-HANS
if ([inputMethod isEqualToString:@"emoji"]) {
}
}
@zedzhao
Copy link
Author

zedzhao commented May 26, 2016

检测键盘状态改变。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment