NSString 剪切板

@implementation NSString (PasteboardGoodies)

- (void) sendToPasteboard
{
        [[NSPasteboard generalPasteboard] 
            declareTypes: [NSArray arrayWithObject: NSStringPboardType]
            owner:nil];
        [[NSPasteboard generalPasteboard]
            setString: self
            forType: NSStringPboardType];
} // sendToPasteboard

@end  // PasteboardGoodies


你可能感兴趣的:(NSString,剪切板)