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
UIView *view = // your view
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
This gives the image which you can store using –
NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
[imageData writeToFile:path atomically:YES];
where path is location you want to save to.