iOS Creat image from UIImageView and couple of UIViews attached on it -
i want create image uiimageview
, couple of uiviews
attached on it.
the image screenshot, if take screenshot, image created same size of screen. now, if create image bigger dimension, screenshot being distorted, though uiimageview
image high resolution image.
so, think problem solved, if create image components other saving screenshot.
i think it.
(it doesn't matter how many views have)
uigraphicsbeginimagecontext(self.window.bounds.size); [self.window.layer renderincontext:uigraphicsgetcurrentcontext()]; uiimage *image = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); nsdata * data = uiimagepngrepresentation(image); [data writetofile:@"foo.png" atomically:yes];
Comments
Post a Comment