I create an open view of the grid.
I created a custom cell that looks like this:

I treat it like this:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *MyIdentifier = @"Cell"; TableGalleryCustomCell *cell = (TableGalleryCustomCell*)[tableView dequeueReusableCellWithIdentifier:MyIdentifier]; if( cell == nil) { NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"TableGalleryCustomCell" owner:nil options:nil]; for (id currentObject in topLevelObjects) { if ([currentObject isKindOfClass:[UITableViewCell class]]) { cell = (TableGalleryCustomCell*)currentObject; break; } } } if (countingIndex < [[[self.appDelegate rssParser] rssItems] count]) { cell.firstAddress.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Address]; cell.firstPrice.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Deposit]; if ([[[[[[self appDelegate] rssParser]rssItems]objectAtIndex:countingIndex] imageURLs] count] != 0 ) { [cell.firstImage setImageWithURL:[NSURL URLWithString:[[[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] imageURLs] objectAtIndex:0.0]]]; cell.firstImage.tag = countingIndex; } } countingIndex++; if (countingIndex < [[[self.appDelegate rssParser] rssItems] count]) { cell.secondAddress.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Address]; cell.secondPrice.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Deposit]; if ([[[[[[self appDelegate] rssParser]rssItems]objectAtIndex:countingIndex] imageURLs] count] != 0 ) { [cell.secondImage setImageWithURL:[NSURL URLWithString:[[[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] imageURLs] objectAtIndex:0.0]]]; cell.secondImage.tag = countingIndex; } } countingIndex++; if (countingIndex < [[[self.appDelegate rssParser] rssItems] count]) { cell.thirdAddress.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Address]; cell.thirdPrice.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Deposit]; if ([[[[[[self appDelegate] rssParser]rssItems]objectAtIndex:countingIndex] imageURLs] count] != 0 ) { [cell.thirdImage setImageWithURL:[NSURL URLWithString:[[[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] imageURLs] objectAtIndex:0.0]]]; cell.thirdImage.tag = countingIndex; } } countingIndex++; if (countingIndex < [[[self.appDelegate rssParser] rssItems] count]) { cell.fourthAddress.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Address]; cell.fourthPrice.text = [[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] Deposit]; if ([[[[[[self appDelegate] rssParser]rssItems]objectAtIndex:countingIndex] imageURLs] count] != 0 ) { [cell.fourthImage setImageWithURL:[NSURL URLWithString:[[[[[self.appDelegate rssParser] rssItems] objectAtIndex:countingIndex] imageURLs] objectAtIndex:0.0]]]; cell.fourthImage.tag = countingIndex; } } countingIndex++; return cell; }
It's a little dirty, but it works ..... until I scroll. After loading the image, then the screen scrolls, the image disappears.
I suppose this could be due to the fact that the image of the Views from the cells is lost?
I tried the exact same implementation, but with only one imageView in each cell, and everything works fine.
Any point in the right direction would be greatly appreciated.
I appreciate any help and thank you for your time.
source share