title: Assertion failure in UICollectionView when trying to reload data
body: <p>I get an Error:</p>
  
  <pre><code>    Assertion failure in -[UICollectionViewData numberOfItemsBeforeSection:],/SourceCache/UIKit_Sim/UIKit-2935.137/UICollectionViewData.m
  
  
      Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for number of items before section 2 when there are only 1 sections in the collection view'
  </code></pre>
  
  <p>when i try to reload the collectionview.It works when new sections are added but when i try to remove them it throws an exception.</p>
  
  <p>update:</p>
  
  <pre><code> - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
      return object.count;
  </code></pre>
  
  <p>}</p>
  
  <pre><code> -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
  if([sortString isEqualToString:@"title"])
      return [Obj.ordered allKeys].count;
  else
      return 1;
  </code></pre>
  
  <p>}</p>