Apples api shows that: collectionView.collectionViewLayout is a UICollectionViewLayout type and it inheritance from NSObject . if i code this it could work well

```
UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionView.collectionViewLayout;
layout.minimumLineSpacing = 0.5;

```

from this codes i guess the type of the collectionViewLayout is：UICollectionViewFlowLayout.

but if i custom define a layout that inheritance from UICollectionViewLayout like this:

```
self.collectionView.collectionViewLayout = [[CustomCollectionViewLayout alloc]init];
UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionView.collectionViewLayout;
layout.minimumLineSpacing = 0.5;

```

it crash and show : 

> 
> -[CustomCollectionViewLayout setMinimumLineSpacing:]: unrecognized selector sent to instance 0x111d0b840
> 
> 
> 

This result is antagonistic to my guess, anyone can explain this , great thanks