OK. Ma collection fonctionne correctement. Mais je veux changer un peu ma disposition. J'ai un tableau avec des nombres différents, donc array.count = 5, j'ai besoin de 5 éléments d'affilée. Je ne sais pas comment l'afficher dans ma vue de collection.Collectionview avec différents éléments d'affilée
Merci pour votre aide.
MISE À JOUR:
maintenant chaque ligne est par exemple 6!
mais je ne sais pas comment gérer avec un tableau de nombres!
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)
}