本文共 325 字,大约阅读时间需要 1 分钟。
下面是如何将字符串放入剪贴板的方法:
@implementation NSString (PasteboardGoodies) - (void) sendToPasteboard [[NSPasteboard generalPasteboard] declareTypes: [NSArray arrayWithObject: NSStringPboardType] [[NSPasteboard generalPasteboard] forType: NSStringPboardType]; @end // PasteboardGoodies 转载地址:http://eihcx.baihongyu.com/