title: UICollectionView Header xib not showing
body: <p>I have a collectionview and I want to use a xib as the header. However, the xib will not appear. First I tried adding a label to the xib, which didn't appear. Then I set the whole background color to red. It it doesn't appear. The collectionview items leave a gap for the header, but it's completely blank. Similar SO threads are <a href="https://stackoverflow.com/questions/12700432/uicollectionview-header-not-showing">this</a> and <a href="https://stackoverflow.com/questions/17463835/collection-view-header-not-showing-up">this</a>, but as I'm not using storyboards and my header height is greater than zero, they don't solve my issue. Here is all my relevant code:</p>
  
  <pre><code>#import "ScoreboardCollectionViewController.h"
  #import "ScoreboardCollectionViewCell.h"
  #import "ScoreboardReusableView.h"
  #import "ScoreboardModel.h"
  #import "Scoreboard.h"
  
  ...
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
      // Register cell classes
      UINib *cellNib = [UINib nibWithNibName:@"ScoreboardCollectionViewCell" bundle:nil];
      [self.collectionView registerNib:cellNib forCellWithReuseIdentifier:@"cell"];
  
      [self.collectionView registerClass:[ScoreboardReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"scoreboardHeader"];
  
  
      self.collectionView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"dark_fish_skin_"]]; 
  }
  
  ...
  
  - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
  {
      return CGSizeMake(self.view.frame.size.width, 34);
  }
  
  - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
             viewForSupplementaryElementOfKind:(NSString *)kind
                                   atIndexPath:(NSIndexPath *)indexPath {
  
      ScoreboardReusableView *view = [[ScoreboardReusableView alloc] init];
  
      view = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader
                                                withReuseIdentifier:@"scoreboardHeader"
                                                       forIndexPath:indexPath];
  
      return view;
  }
  </code></pre>
  
  <p>Here is a screenshot of my xib:
  <img src="https://i.stack.imgur.com/fuBN2.png" alt="enter image description here"></p>