tags:

views:

96

answers:

1

On iphone, is it possible to "screen capture" an UIView and all its subview? If it is possible, how?

+2  A: 

I found this, but haven't tried out myself:

http://reusablesnippets.posterous.com/capture-uiview

Here you find the used -renderInContext: http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004500-CH1-SW120

edit

I transformed the codes above to a category on UIView: https://gist.github.com/67f11f4968f3eb0aa095

call it like this: [aView saveScreenshotToPhotosAlbum];

vikingosegundo