Objective-C从远程地址下载图片

2015-07-08 0 392
Objective-C从远程地址下载图片
- (UIImage *) getImageFromURL: (NSString *)theURL {
    UIImage *theImage = NULL;
    NSString *imageFileName = [BT_strings getFileNameFromURL:theURL];
    NSData *imageData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:theURL]];
    theImage =  [[UIImage alloc] initWithData:imageData];
    [BT_fileManager saveImageToFile:theImage fileName:imageFileName];
    return theImage;
}

遇见资源网 objective-c Objective-C从远程地址下载图片 http://www.ox520.com/17978.html

常见问题

相关文章

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

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