title: Header view not working class registering error, UICollectionView
body: <p>I am trying to show header on UICollectionView but class is not getting registered. Below is my code.</p>
  
  <pre><code>- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
  {
      NSString *identifier = nil;
  
      if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
          identifier = @"header";
      }
  
      UICollectionReusableView *supplementaryView = [self.collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"header" forIndexPath:indexPath];
  
      return supplementaryView;
  }
  
  //  Registering class in viewDidLoad
  
  [self.collectionView registerClass:[UICollectionReusableView class] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"header"];
  </code></pre>
  
  <p>One thing to tell i have not created any other class or view controller, just registering UICollectionReusableView, same way i registered UICollectionView class, it works, don't know why it is giving same error every time.
  I just wanted to display image that i put on cell so no sub classing done. Just did as </p>
  
  <pre><code>[self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"Cell"];
  </code></pre>
  
  <p>similarly tried for header.
  The error i got every time is:</p>
  
  <pre><code>UICollectionElementKindSectionHeader with identifier Test Header View - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
  </code></pre>
  
  <p>Please guide in this  i am not getting what is error, already spend two days on it. What i am missing not getting. Please guide.</p>