I found some sample is teach you how to draw on iphone
but it does not say how to save a view as image ?
Does anyone got idea ???
Or any sample will be helpful : )
actually,I'm trying to save user's signature as a image and upload it to server.
Thanks
Webber
This gives the image which you can store using –
where path is location you want to save to.
Here is a quick method to render any UIView as image. It takes into account the iOS version the device is running on and makes use of the relevant method for acquiring an image representation of a UIView.
More specifically, now there is better method (i.e., drawViewHierarchyInRect:afterScreenUpdates:) for taking screenshot of a UIView on devices running on iOS 7 or later versions, which is, from what i've read, considered to be a more performant way as compared to "renderInContext" method.
More info here: https://developer.apple.com/library/ios/documentation/uikit/reference/uiview_class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW217
USAGE EXAMPLE:
CODE:
In MonoTouch/C# as an extension method: