Save UIView 's Snapshot.

 
 
 
UIGraphicsBeginImageContext(myView.bounds.size);
            [myView.layer renderInContext:UIGraphicsGetCurrentContext()];
            UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
            UIGraphicsEndImageContext();
原文地址:https://www.cnblogs.com/cnsoft/p/1405547.html