0

I want to place 6 cells in two rows and having spacing = 1 between cells, I have tried the minimalLineSpacing method but it works between cells not between rows. Is there any trick or suggestions to achieve that? here is what i have tried so far: here is how it look like now and it is how i make the size of the cells

and i used this mehtods to achive spacing = 1 between cells

Ulugbek
  • 81
  • 8
  • Check these links:- 1. https://stackoverflow.com/questions/28325277/how-to-set-cell-spacing-and-uicollectionview-uicollectionviewflowlayout-size-r 2. https://stackoverflow.com/questions/28386506/remove-space-between-sections-in-collectionview – Nexus Mar 17 '20 at 16:31

1 Answers1

0
// spacing between cells
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
    return cellSpacing
}
// spacing between rows
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
    return cellSpacing
}
Toto
  • 527
  • 4
  • 16