title: Swift unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
body: <p>I'm trying to filter the rows, when I click on some letter it's returning this </p>
  
  <pre><code>unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard)
  </code></pre>
  
  <p>Here is my List Data Class:</p>
  
  <pre><code>//
  //  HomeTableViewController.swift
  //  
  //
  //  Created by Wesley Mota on 06/06/16.
  //
  //
  
  import UIKit
  import Firebase
  
  class HomeTableViewController: UITableViewController, UISearchBarDelegate, UISearchDisplayDelegate {
  var ref = FIRDatabase.database().reference()
  
  var nome: String!
  var items = [GroceryItem]()
  var sobrenome: String!
  var filteredItems = [GroceryItem]()
  
  
  var detailViewController: DetailViewController? = nil
  
  @IBOutlet weak var questionTableView: UITableView!
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      ref.child("Cadastro").observeSingleEventOfType(.Value, withBlock: { (snapshot) in
          var newItems = [GroceryItem]()
  
          for item in snapshot.children {
  
              let groceryItem = GroceryItem(snapshot: item as! FIRDataSnapshot)
              newItems.append(groceryItem)
          }
  
          self.items = newItems
          self.tableView.reloadData()
      })
  
      // Uncomment the following line to preserve selection between presentations
      // self.clearsSelectionOnViewWillAppear = false
  
      // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
      // self.navigationItem.rightBarButtonItem = self.editButtonItem()
  }
  
  override func viewDidAppear(animated: Bool) {
      super.viewDidAppear(animated)
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  // MARK: - Table view data source
  
  override func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      // #warning Incomplete implementation, return the number of sections
      return 1
  }
  
  override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      // #warning Incomplete implementation, return the number of rows
      //return items.count
  
      if (tableView == self.searchDisplayController?.searchResultsTableView){
          return self.filteredItems.count
      } else{
          return items.count
      }
  
  }
  
  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! CustomTableViewCell
  
      let groceryItem = items[indexPath.row]
      var items1: GroceryItem
  
      if (tableView == self.searchDisplayController?.searchResultsTableView) {
          items1 = self.filteredItems[indexPath.row]
  
      } else {
          items1 = self.items[indexPath.row]
      }
  
      cell.nameLbl.text = groceryItem.nome
      cell.lastNameLbl.text = groceryItem.sobrenome
  
      return cell
  }
  
  override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      tableView.deselectRowAtIndexPath(indexPath, animated: true)
  
      var items1: GroceryItem
      if (tableView == self.searchDisplayController?.searchResultsTableView) {
          items1 = self.filteredItems[indexPath.row]
      } else {
          items1 = self.items[indexPath.row]
      }
  
      print(items1.nome)
  
  }
  
  func filterContetnForSearchText(searchText: String, scope: String = "All") {
  
      self.filteredItems = self.items.filter({ (friend: GroceryItem) -&gt; Bool in
          var categoryMatch = (scope == "All")
          var stringMatch = friend.nome.rangeOfString(searchText)
  
          return categoryMatch &amp;&amp; (stringMatch != nil)
      })
  
  }
  
  func searchDisplayController(controller: UISearchDisplayController, shouldReloadTableForSearchString searchString: String?) -&gt; Bool
  
  {
      self.filterContetnForSearchText(searchString!, scope: "All")
      return true
  
  }
  
  func searchDisplayController(controller: UISearchDisplayController, shouldReloadTableForSearchScope searchOption: Int) -&gt; Bool
  
  {
  
      self.filterContetnForSearchText(self.searchDisplayController!.searchBar.text!, scope: "All")
      return true
  
  }
  }
  </code></pre>
  
  <p>Here is my CustomTableViewCell</p>
  
  <pre><code>//
  //  Labels.swift
  //  enquetepr
  //
  //  Created by Wesley Mota on 06/06/16.
  //  Copyright © 2016 WesleyMota. All rights reserved.
  //
  
  import UIKit
  
  class CustomTableViewCell: UITableViewCell {
  
      @IBOutlet weak var nameLbl: UILabel!
      @IBOutlet weak var lastNameLbl: UILabel!
  
  }
  </code></pre>
  
  <p>Class connection with firebase database:</p>
  
  <pre><code>//
  //  SubmitConnection.swift
  //  enquetepr
  //
  //  Created by Wesley Mota on 06/05/16.
  //  Copyright © 2016 WesleyMota. All rights reserved.
  //
  
  import Foundation
  import Firebase
  
  struct GroceryItem {
  
  var data: NSData = NSData()
  
  let key: String!
  let nome: String!
  let sobrenome: String!
  let ref: FIRDatabaseReference?
  
  // Initialize from arbitrary data
  init(nome: String, key: String = "", sobrenome: String) {
      self.key = key
      self.nome = nome
      self.sobrenome = sobrenome
      self.ref = nil
  }
  
  init(snapshot: FIRDataSnapshot) {
      key = snapshot.key
      nome = snapshot.value!["nome"] as! String!
      sobrenome = snapshot.value!["sobrenome"] as! String!
      ref = snapshot.ref
  }
  
  func toAnyObject() -&gt; AnyObject {
      return [
          "nome": nome,
          "sobrenome": sobrenome,
      ]
  }
  </code></pre>
  
  <p>}</p>
  
  <p>When I click on some letter >> <a href="https://drive.google.com/file/d/0B2trSrMuYTn4Si1RaUgxU3hLVVE/view?usp=sharing" rel="nofollow">Image</a></p>
  
  <p>Here is the Story Board cell id >> <a href="https://drive.google.com/file/d/0B2trSrMuYTn4eFZITmZhcEJTS2s/view?usp=sharing" rel="nofollow">Image</a></p>
  
  <p>I'm using firebase, to store data. It's working (loading) fine, but when I try to filter is happening this error.</p>