Objective c UIPasteboard:图像保存问题
我原以为处理Objective c UIPasteboard:图像保存问题,objective-c,ios5,uiimage,ios6,uipasteboard,Objective C,Ios5,Uiimage,Ios6,Uipasteboard,我原以为处理UIPasteboard很容易,但结果却是一个耗时的问题 我想在UIPasteboard中存储UIImage,然后将此图像粘贴到iMessage,WhatsApp,Gmail。。。等等 这是我使用UIPasteboard - (void) postClipboard { if ([[modelView currentView] isImage]) { UIImage *image = [self readyImageLandscape:orientat
UIPasteboard
很容易,但结果却是一个耗时的问题
我想在UIPasteboard
中存储UIImage
,然后将此图像粘贴到iMessage
,WhatsApp
,Gmail
。。。等等
这是我使用UIPasteboard
- (void) postClipboard
{
if ([[modelView currentView] isImage])
{
UIImage *image = [self readyImageLandscape:orientationLandscape];
[[UIPasteboard generalPasteboard] setImage:image];
}
}
它适用于iPhone 3GS 5.1
。我在Gmail
和WhatsApp
然后我修改了这个方法
- (void) postClipboard
{
if ([[modelView currentView] isImage])
{
UIImage *image = [self readyImageLandscape:orientationLandscape];
[[UIPasteboard generalPasteboard] setImage:image];
[[UIPasteboard generalPasteboard] setPersistent:YES];
}
}
仍然适用于iPhone 3GS 5.1
但是我的雇主说它在iPhone 4S 6.0上不起作用,无论是在WhatsApp上还是在任何其他应用程序上都不起作用
我做错了吗?还是应该有另一种方法让它在iPhone 4S 6.0上工作?请参见以下答案:
看起来该代码可以处理单个图像,但不能处理多个图像。是的。在你的链接的帮助下,我找到了一个很好的解决方案!谢谢