-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
// if ([[[UITextInputMode currentInputMode] primaryLanguage] isEqualToString:@"emoji"]) {
// return NO;
// }
if ([[[UIApplication sharedApplication] textInputMode].primaryLanguage isEqualToString:@"emoji"]) {
return NO;
}
return YES;
}
网友评论