iOS捕捉屏幕截图

2015-11-04 0 646
iOS捕捉屏幕截图
+ (UIImage *) imageFromView: (UIView *) theView
{
    // Draw a view’s contents into an image context
    UIGraphicsBeginImageContext(theView.frame.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    [theView.layer renderInContext:context];
    UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return theImage;
}

遇见资源网 objective-c iOS捕捉屏幕截图 http://www.ox520.com/18090.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务