I need to grab an UIImage from a UITextView or UILabel. I\'ve got a method that will pull an image successfully from other types of views ( [UIViewController view], MKMapView, U
I was having the same problem, getting a white rect instead of the text. To solve this, instead of using UIGraphicsBeginImageContext
I used UIGraphicsBeginImageContextWithOptions
and passed NO for opaque (second argument), that did the trick.
Also passed 0.0 for scale (third argument) and to get a context with a scale factor equal to that of the screen (to look good in retina device in my case).
Check the Apple doc about UIGraphicsBeginImageContextWithOptions
here.