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