i am working on one application in which i have created one table view using custom cell.In custom cell i have added imageview.i am parsing images from server and add that images to tableview now when user press on delete button i want to reload tableview data but the problem is that previously added subviews are not released.I also use code for release it but it not works.
Here is sample code and image of tableview
if (buttonIndex == 0)
{
[images removeObjectAtIndex:selectedImage];
for(id object in [self.view subviews])
{
[object removeFromSuperview];
}
//for (UIImageView *aLabel in [tv subviews]) [aLabel removeFromSuperview];
[self.myTableView reloadData];
}

Inside your “cellForRowAtIndexPath” table method, put below code before you add the image subview.
Also “cell” should be initialize once.
return cell;
Hi have updated code. Please review it.
Cheers