截图

来源:互联网 发布:新闻直播软件下载 编辑:程序博客网 时间:2024/04/28 06:04
 CGSize s = theView.bounds.size;
    UIGraphicsBeginImageContextWithOptions(s, NO, [UIScreen mainScreen].scale);
    [theView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage*image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return image;


 CGSize s = theView.bounds.size;    UIGraphicsBeginImageContextWithOptions(s, NO, [UIScreen mainScreen].scale);    [theView.layer renderInContext:UIGraphicsGetCurrentContext()];    UIImage*image = UIGraphicsGetImageFromCurrentImageContext();    UIGraphicsEndImageContext();    return image;


0 0
原创粉丝点击