UIGraphicsBeginImageContext(theView.contentSize);
CGContextRef context = UIGraphicsGetCurrentContext();
[theView setNeedsLayout];
[theView.layer renderInContext:context];
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSLog(@"theImage %@",theImage);
return theImage;
我想保存textView的图片,但无法抓住完整的textView。图像仅显示屏幕上显示的文字。我不是美国人,所以我的英语很差,我无法从我们的技术支持网站得到答案。保存图片的文字查看
你最终的目标是什么?你为什么要保存textView的图像? – Pochi 2012-07-12 00:20:13
,因为微博在中国有140个字数的限制。 – user1518142 2012-07-12 02:25:01