Quantcast
Viewing all articles
Browse latest Browse all 37

Answer by Sargis for How to take ScreenShot Of UIView Which is not in memory iOS

Use this:

- (UIImage*)snapShot:(UIView*)myView {    UIGraphicsBeginImageContext(myView.frame.size);    [myView.layer renderInContext:UIGraphicsGetCurrentContext()];    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();    UIGraphicsEndImageContext();    return viewImage;}

Viewing all articles
Browse latest Browse all 37

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>