我有一个NSArray
包含NSString
s 的图像网址,如下所示:
NSArray *array = [NSArray arrayWithObjects:@"http://graphics8.nytimes.com/images/2014/07/22/blogs/20140722-lens-mark-slide-SG5C/20140722-lens-mark-slide-SG5C-custom1.jpg", @"http://graphics8.nytimes.com/images/2014/07/22/blogs/20140722-lens-mark-slide-SG5C/20140722-lens-mark-slide-SG5C-custom2.jpg", @"http://graphics8.nytimes.com/images/2014/07/22/blogs/20140722-lens-mark-slide-6N62/20140722-lens-mark-slide-6N62-blog480.jpg", nil];
我如何得到CGSize
每个imageUrl
?
我知道如何获得一个 imageUrl 的大小,如下所示:
UIImage *image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://graphics8.nytimes.com/images/2014/07/22/blogs/20140722-lens-mark-slide-SG5C/20140722-lens-mark-slide-SG5C-jumbo.jpg"]]];
CGSize imageSize = image.size;