Objective c 粘贴板-复制(图像)在自定义键盘中创建神秘\n换行符
当我在粘贴板上添加一个图像时,我在图像的末尾得到一个换行符 这是我的密码Objective c 粘贴板-复制(图像)在自定义键盘中创建神秘\n换行符,objective-c,iphone,ios8,uipasteboard,Objective C,Iphone,Ios8,Uipasteboard,当我在粘贴板上添加一个图像时,我在图像的末尾得到一个换行符 这是我的密码 UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; NSData *data= UIImagePNGRepresentation([UIImage imageNamed:@"2.png"]); [pasteboard setData:data forPasteboardType:@"public.png"]; 此代码成功地从
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
NSData *data= UIImagePNGRepresentation([UIImage imageNamed:@"2.png"]);
[pasteboard setData:data forPasteboardType:@"public.png"];
此代码成功地从粘贴板粘贴了图像,但图像带有额外的换行符(在图像旁边)。
如果我只是复制文本,它不会添加神秘的换行符
如果有人能想出一些好的解决方案,请与我分享。
提前谢谢