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.
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.
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.