title: unable to dequeue a cell with identifier cellId - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
body: <p>This piece code used to work in 8.3, but since I moved the app to my new computer with Xcode 9.3, I am getting the error. </p>
  
  <blockquote>
    <p>unable to dequeue a cell with identifier cellId - must register a nib or a class for the identifier or connect a prototype cell in a storyboard </p>
  </blockquote>
  
  <p>although in my code I clearly register the cell.</p>
  
  <pre><code>import Foundation
  import UIKit
  
  class ServiceTypeSelector: UITableViewController,UINavigationBarDelegate {
    let defaults = UserDefaults.standard
  
    let sections = ["All Users &amp; Services","Automotive", "Building &amp; Construction", "Cleaning", "Landscaping &amp; Gardening"]
    let services = [["All Users &amp; Services"],["Automotive"],["Air Conditioning &amp; Heating","Bricklaying", "Carpentry","Carpet Layer","Concreting &amp; Paving","Electrical","Fencing and Gates","Flooring","Handyman","Other","Painting &amp; Decorating","Pet Control","Plastering","Plumbing","Roofing","Rubbish Removal","Scaffolding","Tiling"], ["Cleaning"],["Landscaping &amp; Gardening"]]
  
    //active for business accounts only
  
    override func viewDidLoad() {
      super.viewDidLoad()    
  
      tableView.backgroundColor = UIColor.gray
  
      guard let serviceBeingSearched = self.defaults.string(forKey: "Service being searched") else { return }
  
  
      navigationItem.title = serviceBeingSearched
  
      self.navigationController!.navigationBar.topItem!.title = ""
  
      tableView.register(ServiceCell.self, forCellReuseIdentifier: "cellId")
      tableView.register(Header.self, forHeaderFooterViewReuseIdentifier: "headerId")
  
      tableView.sectionHeaderHeight = 50
  
    }
  
    override func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
  
  
      let serviceBeingSearched = self.defaults.string(forKey: "Service being searched")
  
      if serviceBeingSearched == nil {
        defaults.set("All Users &amp; Services", forKey: "Service being searched")
  
        tableView.reloadData()
      }
  
      return self.sections[section]
  
    }
  
    override func numberOfSections(in tableView: UITableView) -&gt; Int {
  
      return sections.count
    }
  
    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
  
      return services[section].count
    }
  
  
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  
      let service = services[indexPath.section][indexPath.row]
  
      defaults.set(service, forKey: "Service being searched")
  
      guard let serviceBeingSearched = self.defaults.string(forKey: "Service being searched") else { return }
  
      navigationItem.title = serviceBeingSearched
  
      tableView.reloadData()
  
    }
  
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
  
      let serviceTypeCell = tableView.dequeueReusableCell(withIdentifier: "cellId", for: indexPath) as! ServiceCell
  
      serviceTypeCell.refinementsLabel.text = services[indexPath.section][indexPath.row]
  
      serviceTypeCell.sectionsSelector = self
  
  
      return serviceTypeCell
    }
    override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
      return tableView.dequeueReusableHeaderFooterView(withIdentifier: "headerId")
    }
  }
  
  class ServiceCell: UITableViewCell {
  
    var serviceTypeSelector: ServiceTypeSelector?
    var sectionsSelector: ServiceTypeSelector?
    var serviceSelector: ServiceTypeSelector?
  
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
      super.init(style: style, reuseIdentifier: reuseIdentifier)
      setupViews()
    }
    required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
    }
    let refinementsLabel: UILabel = {
      let label = UILabel()
      label.text = "Sample Item"
      label.translatesAutoresizingMaskIntoConstraints = false
      label.font = UIFont.boldSystemFont(ofSize: 14)
      return label
    }()
    let selectedRefinementsLabel: UILabel = {
      let b = UILabel()
      b.text = "Select"
      b.font = b.font.withSize(14)
      b.translatesAutoresizingMaskIntoConstraints = false
      return b
    }()
  
    func setupViews() {
      addSubview(refinementsLabel)
      addSubview(selectedRefinementsLabel)
  
      //selectedPreferenceLabel.addTarget(self, action: #selector(MyCell.handleAction), for: .touchUpInside)
  
      addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|-16-[v0]-2-[v1(80)]-8-|", options: NSLayoutFormatOptions(), metrics: nil, views: ["v0": refinementsLabel, "v1": selectedRefinementsLabel]))
  
      addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[v0]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["v0": refinementsLabel]))
      addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|[v0]|", options: NSLayoutFormatOptions(), metrics: nil, views: ["v0": selectedRefinementsLabel]))
  
    }
  }
  </code></pre>