Я так делал ток ничего не получается. Либо не так
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
let p = Array(sessionFilm)
if section > 0 {
return p[section].value.count - 1
}
return 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: detailСell, for: indexPath) as! SessionFilmCell
let item = Array(sessionFilm)[indexPath.section - 1].value[indexPath.item]
if indexPath.section > 0 {
cell.timeFormatsLabel.text = "\(item.time ?? "")\n"
cell.soundFormatsLabel.text = "\(item.formats!.joined()) \(item.upgrades!.joined())"
}
return cell
}