The approach you've used would usually let you change the class of an instance in a storyboard. However, for a UICollectionView
, you need to do something slightly different.
Instead of selecting the UICollectionViewLayout
instance itself and adjusting its custom class parameter, select the UICollectionView
instance, as show in this screen grab:
Now, in the storyboard inspector, select the "Attributes" inspector pane for the UICollectionView
instance. You'll see something like this:
You need to change the "Layout" field combo box so that instead of "Flow" being selected, "Custom" is selected. A text field will then be appear to set your UICollectionViewLayout
custom subclass, like this: