之前一直都是使用第三方的类别实现ImageView从指定URL加载图片的功能,今天偶然发现另外一个方法。
NSString *url = @"*****"; UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:url]]];
之前一直都是使用第三方的类别实现ImageView从指定URL加载图片的功能,今天偶然发现另外一个方法。
NSString *url = @"*****"; UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:url]]];
转载于:https://www.cnblogs.com/karimlee/p/4877273.html