title: 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 display a TableView of a list of songs in a user's library.  I used the code from <a href="http://code.tutsplus.com/tutorials/build-an-ios-music-player-player-controls--pre-50351">this tutoria</a>l (which uses a storyboard, but I would like to try it a different way and with just a subclass of UITableView).</p>
  
  <p>I get the error:</p>
  
  <pre><code>*** Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit/UIKit-2903.23/UITableView.m:5261
  2014-05-07 20:28:55.722 Music App[9629:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '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>and an error <code>Thread 1: SIGABRT</code> on the line:</p>
  
  <pre><code>UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>#pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  {
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  {
      MPMediaQuery *songsQuery = [MPMediaQuery songsQuery];
      NSArray *songs = [songsQuery items];
  
      return [songs count];
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
  
      // Configure the cell...
  
      MPMediaQuery *songsQuery = [MPMediaQuery songsQuery];
      NSArray *songs = [songsQuery items];
  
      MPMediaItem *rowItem = [songs objectAtIndex:indexPath.row];
  
      cell.textLabel.text = [rowItem valueForProperty:MPMediaItemPropertyTitle];
      cell.detailTextLabel.text = [rowItem valueForProperty:MPMediaItemPropertyArtist];
  
      cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Table-view-background.png"]];
      cell.textLabel.textColor = [UIColor colorWithRed:0.278 green:0.278 blue:0.278 alpha:1.0];
  
      cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Table-view-selected-background.png"]];
  
      cell.textLabel.backgroundColor = [UIColor clearColor];
      cell.detailTextLabel.backgroundColor = [UIColor clearColor];
  
      return cell;
  }
  </code></pre>
  
  <p>The app loads and works fine, showing a blank table when I run it in the iPhone simulator on my Mac.  it comes up with this error when I run it on my iPhone.</p>
  
  <p>Any help would be much appreciated, thanks!</p>