是否可以?我需要保存屏幕并从 iPad 发送到 WebService...具体问题是我想在屏幕上模拟一个标志,然后将此标志保存在 NSData 中并通过电子邮件发送。
有什么想法?
谢谢大家!
最好的祝福!
是否可以?我需要保存屏幕并从 iPad 发送到 WebService...具体问题是我想在屏幕上模拟一个标志,然后将此标志保存在 NSData 中并通过电子邮件发送。
有什么想法?
谢谢大家!
最好的祝福!
UIView *view = ...; // Get root view of current view controller
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData *imageData = UIImagePNGRepresentation(viewImage);