Iphone UICollectionView节中的单元格数

Iphone UICollectionView节中的单元格数,iphone,objective-c,uicollectionview,Iphone,Objective C,Uicollectionview,如何计算分区中的单元格数?在单元格选择过程中,我需要知道节中的单元格数。使用此方法在“集合”视图中查找节中的项目数 - (NSInteger)numberOfItemsInSection:(NSInteger)section; 您可以使用UICollectionView对象作为调用它 NSInteger numberOfItems = [myCollectionView numberOfItemsInSection:2]; 其中2是要查找其项数的节。-(NSInteger)collectio

如何计算分区中的单元格数?在单元格选择过程中,我需要知道节中的单元格数。

使用此方法在“集合”视图中查找节中的项目数

- (NSInteger)numberOfItemsInSection:(NSInteger)section;
您可以使用UICollectionView对象作为调用它

NSInteger numberOfItems = [myCollectionView numberOfItemsInSection:2];

其中2是要查找其项数的节。

-(NSInteger)collectionView:(UICollectionView*)collectionView numberOfItemsInSection:(NSInteger)节{感谢您的帮助。