Iphone UIPasteBoard更改我的图像方向
我正在Iphone UIPasteBoard更改我的图像方向,iphone,objective-c,ios,uipasteboard,Iphone,Objective C,Ios,Uipasteboard,我正在UIPasteBoard中复制图像数组,当我尝试在mail中粘贴图像时,图像方向正在改变。这就是我复制图像的方式 UIPasteboard *pasteBoard = [UIPasteboard generalPasteboard]; pasteBoard.images = imageArray; 如何在不更改图像方向的情况下复制图像?UIImage的imageWithCGImage:scale:orientation:method如果您对结果不满意,可以修改方向 在应用方向信息旋转之
UIPasteBoard
中复制图像数组,当我尝试在mail
中粘贴图像时,图像方向正在改变。这就是我复制图像的方式
UIPasteboard *pasteBoard = [UIPasteboard generalPasteboard];
pasteBoard.images = imageArray;
如何在不更改图像方向的情况下复制图像?UIImage的imageWithCGImage:scale:orientation:method如果您对结果不满意,可以修改方向 在应用方向信息旋转之前,邮件应用程序显示的可能是真正的像素阵列
:我有这个工作。我只是使用setData为其提供原始数据,然后使用forPasteboardType设置数据类型。就在你的下面 如果(文件存在){ 试试这个
NSData *data = [NSData dataWithContentsOfFile:imagefile];
[pasteboard setData:data forPasteboardType:@"public.png"];
这可能会对您有所帮助。但我无法更改邮件应用程序中的默认粘贴选项。您根本不需要更改粘贴。只需查看图像的尺寸并协商匹配的方向即可。但使用此选项,我只能复制一个图像。我想复制多个图像。。