title: Multiple UICollectionViews in ViewController | Would not call one CollectionViews Delegate methods
body: <p>SO I have two <code>UICollectionViews</code> in my <code>UIViewController</code> in Storyboard and both are linked with delegate and datasource to my ViewController. All the associated <code>UICollectionView</code> delegate methods are implemented and checks for the <code>UICollectionViews</code> are implemented. But it's so frustrating that one <code>UICollectionView</code> is getting catered while the other one is getting completely ignored. I have scratched my head in all the available aspects but it is kind of putting me further towards the edge, please help. </p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
          if collectionView == self.variantsCollectionView {
  //            let count = (item?.variant_groups?.count)!
              return 1
          } else {
              return 2//(item?.extra_groups?.count)!
          }
      } 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell{
  
          if collectionView == self.variantsCollectionView {
              //IT DOESNT EVEN COME HERE AT ALL
              let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell_variant", for: indexPath)
              return cell
  
          } else {
              let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
              //HERE IT COMES ALWAYS FOR THE NUMBER OF CELLS
  
              return cell
          }
  
      }
  </code></pre>
  
  <p>Whereas the UICollectionViews are connected like this:
  <a href="https://i.stack.imgur.com/14aSM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/14aSM.png" alt="enter image description here"></a></p>
  
  <p>and:
  <a href="https://i.stack.imgur.com/Q7lDu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q7lDu.png" alt="enter image description here"></a></p>
  
  <p>Please please help. Thank you so much</p>