如何检测NSString
是否包含下图所示的NSTextAttachment
[OBJ]?如何检测NSString是否包含NSTextAttachment图像?
记录文本除纯文本外不显示任何内容。
NSLog(@" Message: %@", message);
我设法与将其删除:
NSCharacterSet *notAllowedChars = [[NSCharacterSet characterSetWithCharactersInString:@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"] invertedSet];
NSString *resultString = [[conversation.lastMessage componentsSeparatedByCharactersInSet:notAllowedChars] componentsJoinedByString:@""];
但感觉更像是一个黑客不是真正的解决方案。我真的很惊讶,它甚至显示出来,因为该消息是NSString
类的实例...
扫描字符值0xfffc。 –