APP 的编程学习

UICollectionView 学习

2017-01-11  本文已影响7人  whong736

数据源协议

讲的非常全的文章 blog.csdn.net/sinat_34194127/article/details/51818975

重要的几个方法

1.设置 UICollectionView 有多少组 Cell

func numberOfSectionsInCollectionView(collectionView: UICollectionView)->Int

2.设置UICollectionView有多少个Item

func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int)->Int

3.设置 UICollectionViewCell 所显示的内容, 以及索引路径,最重要的cell详细内容填充部分

func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath)->UICollectionViewCell

上一篇 下一篇

猜你喜欢

热点阅读