func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let collectionViewCellWithd = collectionView.frame.width / 3 - 1
return CGSize(width: collectionViewCellWithd, height: collectionViewCellWithd)
}
//윗라인
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
return 1
}
//옆 라인 간격
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
return 1
}
'개발 > 개발' 카테고리의 다른 글
[iOS] - 화면 탭 후 좌표 얻기와 그 자리에 도형 그리기 (0) | 2020.09.14 |
---|---|
iOS - 공식 문서만으로 iOS 개발 배우기[Sungdoo님] (0) | 2020.09.14 |
iOS - Dispatch Queues[Zedd님] (0) | 2020.09.11 |
[SwiftUI] - Overlay, Background (겹치기, 중첩, 쌓기) (0) | 2020.09.09 |
[SwiftUI] - StackView 조합해보기 (0) | 2020.09.08 |