扫二维码与项目经理沟通
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // do something [NSThread detachNewThreadSelector:@selector(startImageread:) toTarget:self withObject:indexPath]; // 获取图片 // do something } -(void)startImageread:(NSIndexPath *)indexPath { UIImage *newp_w_picpath = ......// 从本地或者网络获取图片 NSDictionary *cellp_w_picpath = [NSDictionary dictionaryWithObjectsAndKeys: indexPath, @"indexPath", newp_w_picpath,@"p_w_picpath", nil]; [self performSelectorOnMainThread:@selector(_setOCellImage:) withObject:cellp_w_picpath waitUntilDone:YES]; } - (void)_setOCellImage:( id )celldata { UIImage *newp_w_picpath = [celldata objectForKey:@"p_w_picpath"];//从参数celldata里面拿出来图片 NSIndexPath *indexPath = [celldata objectForKey:@"indexPath"]; [self.DataTable cellForRowAtIndexPath:indexPath].p_w_picpathView.p_w_picpath = newp_w_picpath; }
我们在微信上24小时期待你的声音
解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流
Copyright © 2002-2023 www.kswjz.com 快上网建站品牌 QQ:244261566 版权所有 备案号:蜀ICP备19037934号
微信二维码
移动版官网