title: UICollectionView- How to remove spacing above first cell?
body: <p>UICollectionView- How to remove spacing above first cell?</p>
  
  <p>I have the top inset = 0, and lines = 10</p>
  
  <p><img src="https://i.stack.imgur.com/0CINw.png" alt="enter image description here"></p>
  
  <pre><code>- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
  
  
  if (indexPath.row == 0) {
      return CGSizeMake(collectionView.width, 44);
  }
  return CGSizeMake(300, 150);
  }
  
  - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
  {
  return UIEdgeInsetsMake(0, 10, 10, 10);
  }
  </code></pre>
  
  <p>Seems it is something to do with setting the first cell to a different size</p>
  
  <p>if i remove the check for row ==0 in sizeForItemAtIndexPath and return same for all cells it is flush with the top.</p>
  
  <p>Any ideas?</p>