在我的應用程序中,我使用的是使用UICollectionView
。我想在UICollectionViewCell
之間設置修復空間。所以我該怎麼做?如何保持uicollectionview單元格之間的間距
這裏是我的代碼:
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAtIndex section: Int) -> CGFloat {
return 20
}
通過這條線,我可以設置單元格之間的空間?
這是我的截圖請看看這個。讓我知道我可以設置固定的距離在兩個橫向或縱向模式
[UICollectionView中的單元格間距]的可能重複(http://stackoverflow.com/questions/17229350/cell-spacing-in-uicollectionview) –