UIView转UIImage

来源:互联网 发布:oracle关闭数据库命令 编辑:程序博客网 时间:2024/06/05 09:45
- (UIImage*)convertViewToImage:(UIView*)v{    UIGraphicsBeginImageContext(v.bounds.size);     [v.layerrenderInContext:UIGraphicsGetCurrentContext()];     UIImage*image = UIGraphicsGetImageFromCurrentImageContext();     UIGraphicsEndImageContext();     returnimage;}

0 0
原创粉丝点击