title: Loading additional cells at the bottom of UICollectionView
body: <p>I am trying to automatically get and load the next page of cells when the user scrolls to the bottom of the<code>UICollectionView</code>. </p>
  
  <p>I am able to do so by adding a <code>UIButton</code> in <code>UICollectoinView</code> footer. When user scrolls to the footer and touches the button, new cells are added correctly. <code>UIButton</code> in the footer can be touched again for adding more pages.</p>
  
  <p>I tried to automate it so when the user scrolls to the bottom, the proper method for adding new cells is called automatically:</p>
  
  <pre><code>- (UICollectionReuseableView *)collectionView: (UICollectionView *)collectionView viewForSupplementaryElementOfKind: (NSString *)kind atIndexPath: (NSIndexPath *) indexPath
  {
  
      // code for headerView
      // ...
  
      // code for footerView
      MySupplementalFooter *footerView = nil;
      if ( [kind isEqual:UICollectionElementKindSectionFooter] )
      {
          footerView = [self.collectionView dequeueReuseableSupplemntaryViewOfKind:kind withReuseIdentifier:@"FooterId" forIndexPath:indexPath];
          if (LoadMoreIsEnabled) 
          {
              footerView.loadMoreFooterButton.setHidden:NO];
              [self loadMoreFooterButtonAction]; // calls the method to add cells to the dictionary for cv 
          } else 
          {
               footerView.loadMoreFooterButton setHidden:YES];
          }
  
          return footerView;
      }
  }
  </code></pre>
  
  <p>The <code>loadMoreFooterButtonAction</code> method is called, but the entire <code>UICollectionView</code> blanks out. Refreshing the <code>UICollectionView</code> does not bring it back.</p>