我有NSTextView
显示这样的图像。
NSTextAttachment *attachment = [[NSTextAttachment alloc] init];
NSImage *attachImage = [NSImage imageNamed:@"Settings"];
attachment.image = attachImage;
NSAttributedString *attributedString = [NSAttributedString attributedStringWithAttachment: attachment];
[[self.textView textStorage] appendAttributedString:attributedString];
图像显示正确,但我无法将图像从文本字段拖到桌面上。每次我尝试我最终得到.rtf文件而不是图像。无论如何围绕这个问题?