Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,在您的瀑布流demo中,使用了LMJElementsFlowLayout,若collectionView返回两组数据,只显示一组数据 #35

Closed
LYluyu opened this issue Sep 11, 2018 · 0 comments

Comments

@LYluyu
Copy link

LYluyu commented Sep 11, 2018

您好,在您的瀑布流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的那组数据

@LYluyu LYluyu closed this as completed Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant