iOS project comprising a collection of demos for iOS Apps, developed in Objective-C;iOSProject iOSdemo iOSdemos ocdemo ocdemos
5.44k
stars
1.63k
forks
source link
您好,在您的瀑布流demo中,使用了LMJElementsFlowLayout,若collectionView返回两组数据,只显示一组数据 #35
Closed
LYluyu closed 6 years ago
您好,在您的瀑布流demo中,使用了LMJElementsFlowLayout,若collectionView返回两组数据,只显示一组数据,例如在百思demo中BSJMeViewController,添加collectionView的数据源方法
(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 2; }
(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { return 3; }
(UICollectionViewCell )collectionView:(UICollectionView )collectionView cellForItemAtIndexPath:(NSIndexPath )indexPath { BSJMeSquareCell squareCell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(BSJMeSquareCell.class) forIndexPath:indexPath]; return squareCell; } 只返回了section为0的那组数据