I’m waiting for some friends to come into town tonight so I thought I might throw together a very basic UICollectionViewFlowLayout
example.
It demonstrates proper use of:
UICollectionViewFlowLayout
properties and basic subclassing.UICollectionViewCell
subclasses..xib
or Storyboard.Important things to note:
UICollectionViewCell
s to neutral when you override prepareForReuse
.setCollectionViewLayout:animated:
to change a layout with animation – never set the property in an animation block and assume it will work.These are just a few of the gems I’ve picked up while writing a short book on UICollectionView
. I’ll let you know when it’s available for sale.
I’ll probably add more layouts to it other than small and large ones. If anyone has anything they want to add or suggestions, let me know.