如何在textView输入框屏蔽emoji表情

it2024-12-12  15

  两行代码解决:

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if ([[[UITextInputMode currentInputMode]primaryLanguage] isEqualToString:@"emoji"]) { return NO; } return YES; }

 

转载于:https://www.cnblogs.com/yulongjiayuan/p/5405762.html

最新回复(0)