title: different types of cells in one collectionView
body: <p>I have 4 different collectionViews in one controller, and in the first collectionView I want to have 3 different cells display. In the below code the app does not crash, but in the first indexPath.item of 0 only case 0: ("cellId") loads. It does not load the other 2 cases. Thanks in advance for any help!</p>
  
  <pre><code>    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
          if indexPath.item == 0 {
               switch indexPath.item {
              case 0:
                  return collectionView.dequeueReusableCell(withReuseIdentifier: "cellId", for: indexPath)
              default:
                  return collectionView.dequeueReusableCell(withReuseIdentifier: "cellId4", for: indexPath)
              }
  
          } else if indexPath.item == 1 {
              return collectionView.dequeueReusableCell(withReuseIdentifier: "cellId2", for: indexPath)
  
          } else if indexPath.item == 2 {
              return collectionView.dequeueReusableCell(withReuseIdentifier: "cellId3", for: indexPath)
  
          } else {
  
          let myCell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellId", for: indexPath)
          return myCell
  
          }
      }
  </code></pre>
  
  <p>// 2 collectionView Cells - only 1 section in each cell<br>
     // cell 1 - withReuseIdentifier "cellId" in collectionViewController</p>
  
  <pre><code>class TravelGuideHomeCellForStats: BaseHomeCell, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
  
      lazy var collectionView: UICollectionView = {
          let layout = UICollectionViewFlowLayout()
          let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)
          cv.backgroundColor = UIColor.white
          cv.dataSource = self
          cv.delegate = self
          return cv
      }()
  
      let cellId = "cellId"
  
  
      override func setupViews() {
          super.setupViews()
  
          collectionView.register(BaseTravelGuideHomeCell.self, forCellWithReuseIdentifier: cellId)
      }
  
      func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          return 1
      }
  
      func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellId", for: indexPath) as! BaseTravelGuideHomeCell
  
          return cell
      }
  
  }
  </code></pre>
  
  <p>// cell 2 - withReuseIdentifier "cellId4" in collectionViewController</p>
  
  <pre><code>class TravelGuideCommentsCell: BaseCommentsCell, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
  
      lazy var collectionView: UICollectionView = {
          let layout = UICollectionViewFlowLayout()
          let cv = UICollectionView(frame: .zero, collectionViewLayout: layout)
          cv.backgroundColor = UIColor.white
          cv.dataSource = self
          cv.delegate = self
          return cv
      }()
  
      let cellId = "cellId"
  
      override func setupViews() {
          super.setupViews()
  
          collectionView.register(BaseTravelGuideCommentsCell.self, forCellWithReuseIdentifier: cellId)
      }
  
      func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          return 1
      }
  
      func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
          let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cellId", for: indexPath) as! BaseTravelGuideCommentsCell
  
          return cell
  
      }
  
  }
  </code></pre>