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