iOS开发之--从URL加载图片

+ (UIImage *) imageFromURLString: (NSString *) urlstring  
{  
    // This call is synchronous and blocking  
    return [UIImage imageWithData:[NSData  
        dataWithContentsOfURL:[NSURL URLWithString:urlstring]]];  
} 

直接转化一下就可以直接拿到图片!

posted @ 2016-09-30 16:07  稻草人11223  阅读(711)  评论(0编辑  收藏  举报
返回顶部