NSString *string = self.textView.text;
NSInteger strLength = string.length;
if (strLength)
{
for (NSInteger i = 0; i < strLength; i ++)
{
if (i < strLength - 1)
{
NSString *tempStr = [string substringWithRange:NSMakeRange(i, 2)];
if ([self stringContainsEmoji:tempStr])
{
self.resultLabel.text = @"结果:输入的字符中含有系统表情";
break;
}
else
{
self.resultLabel.text = @"结果:输入的字符中不含系统表情";
}
}
}
}