怎么解决UICollectionViewCell视图重叠

2025-03-25 07:10:52
推荐回答(1个)
回答1:

ollectionView:cellForItemAtIndexPath:方法里一个合适的位置加上:
for (UIView *view in cell.contentView.subviews) {
[view removeFromSuperview];
}