NSURL *url = [NSURL URLWithString:[[self.imageSource objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]];
UIImage *icon = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]];
CGSize itemSize = CGSizeMake(30, 30);
UIGraphicsBeginImageContextWithOptions(itemSize, NO,0.0);
CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height);
[icon drawInRect:imageRect];
cell.imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
网友评论