Здесь tableview после прокрутки 2 3 раза вверх и вниз добавляют изображения во все ячейки. Вот кодDuplicate UItableViewCell, строки UITableView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
HomeCell *cell = (HomeCell *) [tableView dequeueReusableCellWithIdentifier:@"HomeCell"];
if (cell == nil) {
cell = [[HomeCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HomeCell"] ;
}
VenueDC *venueObj = [subSubCategoriesArray objectAtIndex:indexPath.row];
cell.lblName.text = venueObj.name;
if ([venueObj.imagesArray count] > 0) {
[cell.ivVenue setImage:venueObj.ivVenue];
[cell.ivVenue setHidden:NO];
cell.lblName.frame = CGRectMake(80, cell.lblName.frame.origin.y, 200, cell.lblName.frame.size.height);
}
venueObj = nil;
return cell;
}
любой Idear Что происходит здесь, изображение только в одном объекте, при первой загрузке он показывает одну ячейку с изображением, но после того, как прокрутка он начинает показывать изображения на другую клетку тоже
Попробуйте эту тему, может быть, это вам поможет. : http: //stackoverflow.com/questions/10535637/reusablecellwithidentifier-issue-in-cellforrowatindexpath/10535788#10535788 – superGokuN