为什么要创建重复的行?
我的代码。
for test im返回空单元格if(indexPath.row > 0 && indexPath.row <5) return cell;
。此登录应返回3行。顶部1个,底部2个。即时上传屏幕
int indexOne = 1;
VVMartCell* cell = [tableView dequeueReusableCellWithIdentifier:martCellIdentifier];
if(indexPath.row > 0 && indexPath.row <5) return cell;
cell.imageView1.image = nil;
cell.imageView2.image = nil;
cell.imageView3.image = nil;
[cell setDelegateController:self];
__weak VVMartCell *weakCell = cell;
//////////
VVMartModel *model1 = [self.dataArray objectAtIndex:indexOne];
[cell setModel1:model1];
if (!model1.imageView) {
model1.imageView = [[UIImageView alloc] init];
}
NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:[model1 path_package]]];
__weak VVMartModel* weakModel1 = model1;
[cell.imageView1 setImageWithURLRequest:request
placeholderImage:nil
success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
if(weakModel1)
{
weakModel1.imageView.image = image;
}
if (weakCell)
{
weakCell.imageView1.image = image;
[weakCell setNeedsLayout];
}
}
failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
}];