title: UITableView - "Could not cast value of type 'UITableViewCell' to AppName.CustomCell"
body: <p>I am getting this error in my console when I try to open my table view:</p>
  
  <blockquote>
    <p>"Could not cast value of type 'UITableViewCell' to 
        'AppName.NameTableViewCell'."</p>
  </blockquote>
  
  <p>A couple points worth noting:</p>
  
  <ol>
  <li>I am not using a storyboard</li>
  <li>I have already registered my cell to the tableView in my viewDidLoad()</li>
  </ol>
  
  <p>Here are some screenshots to clarify.</p>
  
  <pre><code>let tableView = UITableView()
  override func viewDidLoad() {
      tableView.register(NameTableViewCell.self, forCellReuseIdentifier: "cellName")
      ...
  }
  
  ...
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      if indexPath.row == 0 {
          let cell = UITableViewCell(style: .default, reuseIdentifier: "cellName") as! NameTableViewCell
          cell.textCell.text = self.menuText[indexPath.row]
          return cell
      }
  }
  </code></pre>