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