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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -