오케이. 내 Collectionview 잘 작동합니다. 하지만 레이아웃을 약간 변경하고 싶습니다. 다른 숫자를 가진 배열을 가지고 있으므로 array.count = 5이고, 5 개의 항목이 연속적으로 필요합니다. 이것을 내 Collectionview에 표시하는 방법을 모르겠습니다.다른 항목이있는 Collectionview가
도움 주셔서 감사합니다.
업데이트 :
이제 모든 행은 예를 들어 6입니다.
하지만 숫자 배열을 처리하는 방법을 모르겠습니다! UICollectionViewDelegateFlowLayout의 프로토콜의 일부
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let numberOfCellInRow : Int = 6
let padding : Int = 1
let collectionCellWidth : CGFloat = (self.view.frame.size.width/CGFloat(numberOfCellInRow)) - CGFloat(padding)
return CGSize(width: collectionCellWidth, height: 200)
}