Reused cells in a UICollectionView show multiple UIImageViews when they should only show one

后端 未结 7 1816
天命终不由人
天命终不由人 2020-12-08 09:53

Im having a problem with my UICollectionView. Initially it displays fine, showing a grid of cells, each cell with a single UIImageView. These

7条回答
  •  囚心锁ツ
    2020-12-08 10:34

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

提交回复
热议问题