我想调整UICollectionView各个section的间距,我尝试了在下面这些布局方法中设置间距,但是都没起作用,我每个section都有一个headerView
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets {
return UIEdgeInsetsZero
}
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAtIndex section: Int) -> CGFloat {
return 1
}
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAtIndex section: Int) -> CGFloat {
return 5
}
那你可以再加一個 footerView呀, footerView 可以當作間距
參考這裡:http://www.huangyibiao.com/ar...