title: app crashes when cell is clicked and segueing to a different view controller
body: <p>I have a view controller with a table view and a search bar. I'd like to send a user to one of the three other view controllers based on the text in the cell.</p>
  <p>SearchViewController:</p>
  <pre><code> func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    
      if (searchBar.text == search[indexPath.row].cleanName) {
          performSegue(withIdentifier: &quot;songs&quot;, sender: self)
      } else if (searchBar.text != search[indexPath.row].cleanName) {
          performSegue(withIdentifier: &quot;artist&quot;, sender: self)
      } else {
          performSegue(withIdentifier: &quot;albums&quot;, sender: self)
      }
      
  }
  </code></pre>
  <p>Whenever I select the cell in the first view controller, my app crashes and I get <strong>Thread 1: signal SIGABRT 'unable to dequeue a cell with identifier SearchTableViewCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'</strong> This error says that I must register a nib for my song view controller but I already did.</p>
  <p>SearhesViewController:</p>
  <pre><code>  class SearchesViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate  {
  
  
  @IBOutlet weak var tableView: UITableView!
  
  @IBOutlet weak var searchesBar: UISearchBar!
  
  var searchActive: Bool = false
  var search = [Search]()
  let filePath = &quot;http://127.0.0.1/musicfiles&quot;
  var songs = [Songs]()
  var artists = [Artist]()
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      let nib = UINib(nibName: &quot;SearchTableViewCell&quot;, bundle: nil)
      tableView.register(nib, forCellReuseIdentifier: &quot;SearchTableViewCell&quot;)
      tableView.delegate = self
      tableView.dataSource = self
      searchesBar.delegate = self
      retriveData()
      print(search)
  }
       func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
      songs = songs.filter({ (songName) -&gt; Bool in
          return songName.songname.lowercased().range(of: searchText.lowercased()) != nil
          })
  
      DispatchQueue.main.async {
          self.tableView.reloadData()
      }
  }
  
  override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
      }
      
  func numberOfSections(in tableView: UITableView) -&gt; Int {
      return 1
  }
  
  func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
      return 120
  }
  
      func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          
          if (searchActive) {
              return search.count
          } else {
              return 1
          }
        
      }
      
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: &quot;SearchTableViewCell&quot;, for:  indexPath) as! SearchTableViewCell
          
          cell.mainLabel!.text = search[indexPath.row].cleanName
          cell.secondLabel!.text = songs[indexPath.row].artistId
          cell.cellImage!.image = UIImage(named: songs[indexPath.row].cover)
          return cell;
      }
  
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          let searchSong = search[indexPath.row].cleanName
          let searchArtist = search[indexPath.row].artistid
          let fileURLString = &quot;\(filePath)\(searchSong)\(searchArtist)&quot;
          print(fileURLString)
          
      }
  </code></pre>