title: Unable to get the right type in cellForItemAtIndexPath in my UICollectionView
body: <p>In my <code>UICollectionView</code>, in its <code>cellForItemAtIndexPath</code> method, I am trying to typecast the cell to my custom cell of type <code>MyCollectionViewCell</code>. But the object is still resolved as just a <code>UICollectionViewCell</code>. What could be the issue? I have associated the cell with my custom class that inherits from <code>UICollectionViewCell</code> in my storyboard. Please see the images below.</p>
  
  <p><a href="https://i.stack.imgur.com/Ddviv.png%60" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ddviv.png%60" alt="The cell is correctly assigned to my custom UICollectionViewCell class"></a></p>
  
  <p><a href="https://i.stack.imgur.com/D43vZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D43vZ.png" alt="Reuse identifier is set correctly too"></a></p>
  
  <p><a href="https://i.stack.imgur.com/UgvqN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UgvqN.png" alt="My cell is not getting resolved to the expected type"></a></p>