根据URL加载网络图片

之前一直都是使用第三方的类别实现ImageView从指定URL加载图片的功能,今天偶然发现另外一个方法。

NSString *url = @"*****";

UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:url]]];

 

posted @ 2015-10-14 13:57  Kimi_Lee  阅读(418)  评论(0编辑  收藏  举报