UIGraphicsBeginImageContextWithOptions(self.imgView.bounds.size, YES, [UIScreen mainScreen].scale);spa
[self.imgView drawViewHierarchyInRect:self.imgView.bounds afterScreenUpdates:YES];it
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();io
UIGraphicsEndImageContext();class