我正在下载一个图像,知道图像的url。现在我如何使用快速查看框架工作查看此图像。我正在使用以下代码下载。
UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL
URLWithString:@"http://good-wallpapers.com/pictures/3048/frosty_apple_logo_iphone.jpg"]]];
我应该做什么来快速查看如果我有一个数组或字典的UIImages像明智..
滚动视图中的UIimageview可以显示所有图像。下面是将数组中的所有图像加载到UIscrollview中的UIimageView
for (UIView *v in [scrollView subviews]) {
[v removeFromSuperview];
}
CGRect workingFrame = scrollView.frame;
workingFrame.origin.x = 0;
for(id datavalue in tableList) {
UIImage *downloadedImage = [UIImage imageWithData:datavalue];
imageview = [[UIImageView alloc] initWithImage:downloadedImage];
[imageview.layer setBorderColor: [[UIColor grayColor] CGColor]];
[imageview.layer setBorderWidth: 2.0];
[imageview setContentMode:UIViewContentModeScaleAspectFit];
imageview.frame = workingFrame;
[scrollView addSubview:imageview];
[imageview release];
workingFrame.origin.x = workingFrame.origin.x + workingFrame.size.width;
}
[scrollView setPagingEnabled:YES];
[scrollView setContentSize:CGSizeMake(workingFrame.origin.x, workingFrame.size.height)];
表列表是图像数据的集合。