title: UICollectionViewFlowLayout subclass causes cell to disappear
body: <p>I am trying to offset the center on y axis, of all cells below selected cell. I added a property to <code>CollectionViewFlowLayout</code> subclass, called <code>extendedCell</code>, which marks the cell below which I should offset everything else.</p>
  
  <pre><code>- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect
  {
      NSArray *attributes = [super layoutAttributesForElementsInRect:rect];
      if(!self.extendedCell)
      {
          return attributes;
      }
      else
      {
          return [self offsetCells:attributes];
      }
  }
  
  - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      UICollectionViewLayoutAttributes *attribute = [super layoutAttributesForItemAtIndexPath:indexPath];
      if(!self.extendedCell)
      {
          return attribute;
      }
      else
      {
          if(![attribute.indexPath isEqual:self.extendedCell] &amp;&amp;
             attribute.center.y &gt;= [super layoutAttributesForItemAtIndexPath:self.extendedCell].center.y)
          {
              CGPoint newCenter = CGPointMake(attribute.center.x,
                                              attribute.center.y + 180.f);
              attribute.center = newCenter;
          }
  
          return attribute;
      }
  }
  
  -(NSArray *)offsetCells:(NSArray *)layoutAttributes
  {
      for(UICollectionViewLayoutAttributes *attribute in layoutAttributes)
      {
          if(![attribute.indexPath isEqual:self.extendedCell] &amp;&amp;
             attribute.center.y &gt;= [super layoutAttributesForItemAtIndexPath:self.extendedCell].center.y)
          {
              CGPoint newCenter = CGPointMake(attribute.center.x,
                                              attribute.center.y + 180.0f);
              attribute.center = newCenter;
          }
      }
  
      return layoutAttributes;
  }
  </code></pre>
  
  <p>Turns out that something bad happens on the way, as cells at the bottom disappear. I have a feeling that this has something to do with cells being outside <code>UICollectionView</code> content size, but setting the size while generating layout does not help. Any ideas how to fix that disappearance? </p>