UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumLineSpacing =10.0f;
//2.初始化collectionView
_homeCollectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, Screen_width , Screen_height - 117) collectionViewLayout:layout];
The code is like this, I don’t know what caused the minimumLineSpacing attribute to fail
原因有很多,是否时实现了设置minimumLineSpacing的delegate,还和collectionView的滑动方向有关。