![Collection view cell design](https://i.stack.imgur.com/9bhcJ.png)
Я добавил ячейки в коллекцию просмотра, каждый из которых имеет разные идентификаторы ячейки.
Но каждый тип ячейки может иметь доступ более чем к одному.
Порядок ячеек будет зависеть от данных, если данные ячейки 5 поступают первыми, ячейка 5 должна показывать как все.
Здесь иногда только одна клетка меняет свое положение.
func collectionView(_ collectionView: UICollectionView, cellForItemAtindexPath: IndexPath) -> UICollectionViewCell {
let valueLabels = Array(valuesPidMap.keys)[indexPath.row]
let pidinfo = self.getsettingsName(pid: valueLabels)
if valueLabels == constants1 {
return cell2
}
if valueLabels == constants2 {
return cell3
}
if valueLabels == constants3 {
return cell4
}
if valueLabels == constants4{
return cell5
}
//for all other constants
// other cell dat objects will come here i will get more then one
return cell
}