數(shù)據(jù)源協(xié)議
講的非常全的文章?blog.csdn.net/sinat_34194127/article/details/51818975
重要的幾個(gè)方法
1.設(shè)置 UICollectionView 有多少組 Cell
func numberOfSectionsInCollectionView(collectionView: UICollectionView)->Int
2.設(shè)置UICollectionView有多少個(gè)Item
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int)->Int
3.設(shè)置 UICollectionViewCell 所顯示的內(nèi)容, 以及索引路徑,最重要的cell詳細(xì)內(nèi)容填充部分
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath)->UICollectionViewCell