title: Invalid nib registered for identifier
body: <p>I'm trying to get a view created in a nib file to be used as a section header in my UITableView. I'm following the 3rd option as described here</p>
  
  <p><a href="http://hons82.blogspot.it/2014/05/uitableviewheader-done-right.html" rel="nofollow noreferrer">http://hons82.blogspot.it/2014/05/uitableviewheader-done-right.html</a></p>
  
  <p>But I'm getting this error </p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid nib registered
    for identifier (sectionHeaderIndentifier) - nib must contain exactly
    one top level object which must be a UITableViewHeaderFooterView
    instance'</p>
  </blockquote>
  
  <p>Here's the code I'm using</p>
  
  <pre><code> UINib *sectionHeaderNib = [UINib nibWithNibName:@"headerNib" bundle:nil];
  
      NSString *SectionHeaderViewIdentifier = @"sectionHeaderIndentifier";
  
      [self.tableView registerNib:sectionHeaderNib forHeaderFooterViewReuseIdentifier:SectionHeaderViewIdentifier];
  </code></pre>
  
  <p>and</p>
  
  <pre><code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  
      NSString *SectionHeaderViewIdentifier = @"sectionHeaderIndentifier";
  
      HeaderSection *sectionHeaderView = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:SectionHeaderViewIdentifier];
  
  
      return sectionHeaderView;
  }
  </code></pre>
  
  <p>And here's a screen shot of my nib file.</p>
  
  <p><img src="https://i.stack.imgur.com/ugQ4p.png" alt="enter image description here"></p>