-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{}
这个方法只提供设置cell之间的距离,最左边的cell和最右边的cell到superview的间距却不能设置。
这样有两种方法来设置
1.改变collectionview的大小
2.设置flowLayout
flowLayout.sectionInset =UIEdgeInsetsMake(0,10,0,10);
collectionVIewCell圆角的设置
cell.contentView.layer.cornerRadius =10;
cell.layer.cornerRadius =10;
cell.contentView.layer.masksToBounds =YES;