//ImageRequest,model.titlepic 这里后台返回的不是一个完整的URL,需要拼接上服务器。如果是完整的URL不需要拼接
[[SDWebImageDownloader sharedDownloader]downloadImageWithURL:[NSURL URLWithString:
[NSString stringWithFormat:@"%@%@!375x235",ImageRequest,model.titlepic]] options:SDWebImageDownloaderUseNSURLCache progress:^(NSInteger receivedSize, NSInteger expectedSize) {
} completed:^(UIImage *image, NSData *data, NSError *error, BOOL finished) {
//这边就能拿到图片了
NSLog(@"imgh = %f,%f",image.size.height,image.size.width);
}];
网络获取图片高度和宽度
最新推荐文章于 2022-05-18 16:53:02 发布