![](https://img.haomeiwen.com/i6348856/5cabfc6d0664d373.gif)
不知道大家有没有碰见这样的问题。
![](https://img.haomeiwen.com/i6348856/25733c74e3ec3607.gif)
我是这么解决的,一开始我做了45个数据源,后来我改成5个分区,每个分区9个数据源才好的,不知道大家有没有好的解决方案,或者是这样做的原理。欢迎告知!
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return 45;
}
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
return 5;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return 9;
}
网友评论