UICollectionView部分中的单元格数目(UICollectionView number of cells in the section)
如何计算该部分中的单元格数量? 我需要知道在单元选择过程中单元的数量。
How to count the number of cells in the section? I need to know the number of cells in the section during the cell selection.
最满意答案
使用此方法作为集合视图来查找节中的项目数量
- (NSInteger)numberOfItemsInSection:(NSInteger)section;你可以使用你的UICollectionView对象来调用它。
NSInteger numberOfItems = [myCollectionView numberOfItemsInSection:2];其中2是您想要查找项目数量的部分。
Use this method for the the collection view to find number of items in a section
- (NSInteger)numberOfItemsInSection:(NSInteger)section;You can call it using your UICollectionView object as.
NSInteger numberOfItems = [myCollectionView numberOfItemsInSection:2];Where 2 is the section for which you want to find the number of items.
更多推荐
发布评论