In my tableView, in some cells i have added an imageView as subview of cell contentView. On scrolling tableView up and down these images duplicating on other cells also. But
As Romit Mewada suggested you can use that but each time you have alloc & add new UIImageView
.
Instead of that you can send nil to the image of that UIImageView
.
Implement in this way.
if (cell == nil)
{
//get your cell or alloc & initialize
// create and add imageView
}
UIImageView* imageView = [cell.contentView viewWithTag:indexPath.row];
imageView.image = nil;
//do your other task, you can use the same imageView to add other image for other row.