系統粘貼板:
-
程序間的通信使用公共方法
UIPasteboard * paster = [UIPasteboard generalPasteboard]; paster.string = _orderDetailInfo.sn;
如果是系統內的通信,需要自己創建
UIPasteboard *paster = [UIPasteboard pasteboardWithName:@"myCopySn" create:YES]; //提供唯一的標識名,如果不存在就create
paster.string = @"要復制的內容";
paster.image = self.image; //要復制的圖片