如何创建具有中心单元格的UICollectionView?

时间:2017-03-03 14:12:22

标签: ios swift xcode storyboard

我需要开发这样的对象。 UICollectionView水平必须居中单元格。并且在同一个中心细胞被标记。 在图片上也是如此:

UICollectionView centertred Cell is selected

1 个答案:

答案 0 :(得分:1)

假设您已将最后选定的单元格保存为名为+-------------------------------------+ |id |start_date |end_date |car_id| +----+------------+------------+------+ |2 |2017-04-15 |2017-04-20 |1 | |3 |2017-04-15 |2017-04-20 |2 | +----+------------+------------+------+ 的数字变量:

savedSelection