对不起,问题标题.我找不到合适的头衔.
我UITableView打开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;
Run Code Online (Sandbox Code Playgroud)
抱歉,我的英语很弱.