- 防止数据源错误,资源重叠:
while ([cell.contentView.subviews lastObject] != nil) {
[(UIView*)[cell.contentView.subviews lastObject] removeFromSuperview]; //删除并进行重新分配
}
while ([cell.contentView.subviews lastObject] != nil) {
[(UIView*)[cell.contentView.subviews lastObject] removeFromSuperview]; //删除并进行重新分配
}
本文标题:TableView reuse
本文链接:https://www.haomeiwen.com/subject/jcfyhttx.html
网友评论