【发布时间】:2012-08-27 10:56:23
【问题描述】:
抱歉,问题标题。我找不到合适的标题。
当我打开 UITableView 时,我有来自 url 的 UITableView 内容图像,直到图像加载后视图才会显示,这需要一些时间。
我通过 php 从 JSON 中获取图像。
我想显示表格,然后显示图像加载过程。
这是来自我的应用程序的代码:
NSDictionary *info = [json objectAtIndex:indexPath.row];
cell.lbl.text = [info objectForKey:@"title"];
NSString *imageUrl = [info objectForKey:@"image"];
cell.img.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageUrl]]];
[cell.img.layer setBorderColor: [[UIColor blackColor] CGColor]];
[cell.img.layer setBorderWidth: 1.0];
return cell;
对不起,我的英语很差。
【问题讨论】:
标签: iphone objective-c uitableview uiimageview