title: Inherit tableview cell deque error in swift
body: <p>I have a UITableview cell and its .xib called <strong>BaseTableviewCell</strong> in which I have defined the outlets for the components like labels, buttons etc. I have another class called <strong>CustomTableviewCell</strong> which inherits the <strong>BaseTableviewCell</strong> and it performs various actions on the outlets defined in the base.</p>
  
  <p><em>My question is how do I register and deque <strong>CustomTableviewCell</strong> in my tableview controller.</em> </p>
  
  <p>I used the below which is not working correctly and leading to application crash</p>
  
  <pre><code>tableview.register(UINib(nibName: "BaseTableviewCell",
                                         bundle: nil ),
                                   forCellReuseIdentifier: "CustomTableviewCell")
  </code></pre>
  
  <p>In cellForRowAt I wrote the following</p>
  
  <pre><code>    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
      let cell = tableView.dequeueReusableCell(withIdentifier: "CustomTableviewCell", for: indexPath) as! CustomTableviewCell
      return cell
  }
  </code></pre>
  
  <p>Please help me as to where I am going wrong and fix this issues</p>