2011-06-06 141 views

回答

13

该代码去除细胞的所有子视图:

if ([cell.contentView subviews]){ 
    for (UIView *subview in [cell.contentView subviews]) { 
     [subview removeFromSuperview]; 
    } 
} 
0

一号线

[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];