title: Could not cast value of type 'UITableViewCell' (0x10f16f778) to 'ProjectName.MyCustomCell' (0x10cc5a568)
body: <p>I'm currently following along with a guide (<a href="https://stackoverflow.com/questions/24170922/creating-custom-tableview-cells-in-swift/36426858#36426858">creating custom tableview cells in swift</a>) to create a custom cell for a UITableView in Swift. However, I'm having an error when I run the project. Below is the code where the error is triggered: </p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
      //  ***** Error triggers on the line below ******
      let cell:MyCustomCellModel = self.plantList.dequeueReusableCell(withIdentifier: cellReuseIdentifier) as! MyCustomCellModel
  
      cell.plantImage.backgroundColor = self.colors[indexPath.row]
      cell.plantLabel.text = self.animals[indexPath.row]
  
      return cell
  } 
  </code></pre>
  
  <p>My issue is identical to ones described in other stackoverflow posts (namely: <a href="https://stackoverflow.com/questions/29812168/could-not-cast-value-of-type-uitableviewcell-to-appname-customcellname">Could not cast value of type &#39;UITableViewCell&#39; to &#39;(AppName).(CustomCellName)&#39;</a>), however none of the solutions therein were able to fix my problem.</p>
  
  <p>Here are the various attempts I've made to fix the problem.</p>
  
  <ul>
  <li><p>Checked that the cell has the correct class and identifier. I checked this first, and below are two relevant screenshots. 
  <a href="https://i.stack.imgur.com/a0mHk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a0mHk.png" alt="Class Name"></a>
  <a href="https://i.stack.imgur.com/qdLd3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qdLd3.png" alt="Identifier"></a></p></li>
  <li><p>I have tried both of the below code solutions to register my class(which I put into the viewdidload method), with neither providing a fix: </p>
  
  <p>self.plantList.register(MyCustomCellModel.self, forCellReuseIdentifier: "cell")
  self.plantList.register(UITableViewCell.self, forCellReuseIdentifier: "cell")</p></li>
  <li><p>I have also tried many of the little fixes that worked for people mentioned in the various stackoverflow posts on this issue, but none of them have worked for  me. </p></li>
  </ul>
  
  <p>Any tips would be greatly appreciated. If any other source code is needed to debug this, I will gladly post it. </p>