If we use the following code I can remove all the subviews including the textLabel. I need to remove all except the contentview titlelabel
for (int i=0; i < [self.mylist count]; i++) {
NSIndexPath *lIndexPath = [NSIndexPath indexPathForRow:i inSection:0];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:lIndexPath];
for (UIView *view in cell.contentView.subviews) {
[view removeFromSuperview];
}
}
any idea how to avoid that
Just check whether the view is of type UILabel, thats it