UICollectionView using sections leaves a gap between cells

前端 未结 2 1115
你的背包
你的背包 2020-12-21 05:23

I\'m using a UICollectionView to show several sections of data. These sections have a fixed number of items. I want all the items to show in a continuous grid.

Right

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 05:33

    Use like this

    It will solve Gap problem

    UICollectionViewFlowLayout *layout=[[UICollectionViewFlowLayout alloc] init];
    
    layout.minimumInteritemSpacing = 0;
    layout.minimumLineSpacing = 2;
    

提交回复
热议问题