It works either way assuming this class is always used on the main thread. I'm just in the habit of using local variables till I'm done with my logic and then doing my assignments at the end. Do you want me to submit a pull request with it the other way?

Sent from my iPhone

> On Nov 28, 2013, at 0:48, Nelson <notifications@github.com> wrote:
> 
> In CHTCollectionViewWaterfallLayout.m:
> 
> >    CGFloat width = self.collectionView.frame.size.width - _sectionInset.left - _sectionInset.right;
> > +  CGFloat interItemSpacingX = 0.0f;
> > +  CGFloat interItemSpacingY = 0.0f;
> > +  if (_columnCount > 1) {
> > +    interItemSpacingX = floorf((width - _columnCount * _itemWidth) / (_columnCount - 1));
> > +  }
> > +  if (_verticalItemSpacing > 0.0f) {
> > +    interItemSpacingY = _verticalItemSpacing;
> > +  }
> > +  else {
> > +    interItemSpacingY = interItemSpacingX;
> > +  }
> > +  _interItemSpacingX = interItemSpacingX;
> > +  _interItemSpacingY = interItemSpacingY;
> Out of curiosity, why there are extra interItemSpacingX and interItemSpacingY?
> Can't we just use _interItemSpacingX and _interItemSpacingY?
> 
> —
> Reply to this email directly or view it on GitHub.