title: Why am I getting an error about being unable to dequeue when my UITableView tries to load?
body: <p>I get the following error:</p>
  
  <blockquote>
    <p><em>*</em> Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell
    with identifier FontCell - must register a nib or a class for the
    identifier or connect a prototype cell in a storyboard'</p>
  </blockquote>
  
  <p>I'm not sure exactly what I'm doing wrong. I set the cell identifier (programmatically, as it's not created through Interface Builder) and do everything I thought I was supposed to do in the delegate methods, but I'm still getting that error when I try to get the UITableView to load.</p>
  
  <p>Here's the relevant code (it's worth noting I've subclassed UITableViewCell for customization options):</p>
  
  <pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      return self.fonts.count;
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
      static NSString *cellIdentifier = @"FontCell";
  
      FontCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
  
      if (!cell) {
          cell = [[FontCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"FontCell"];
          cell.selectionStyle = UITableViewCellSelectionStyleNone;
      }
  
      int row = indexPath.row;
  
      cell.fontFamilyLabel.text = self.fonts[row];
  
      return cell;
  }
  </code></pre>
  
  <p>And here's the only method I changed in my subclassed UITableViewCell (FontCell):</p>
  
  <pre><code>- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  {
      self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
      if (self) {
          self.fontFamilyLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 200, 20)];
          self.fontFamilyLabel.textAlignment = NSTextAlignmentCenter;
  
          [self.contentView addSubview:self.fontFamilyLabel];
      }
      return self;
  }
  </code></pre>
  
  <p>What exactly am I doing wrong?</p>