Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Stick last section to the bottom #21

Open
nipun0505 opened this issue Oct 23, 2017 · 0 comments
Open

Stick last section to the bottom #21

nipun0505 opened this issue Oct 23, 2017 · 0 comments

Comments

@nipun0505
Copy link

nipun0505 commented Oct 23, 2017

So I used this piece of code, to make the last section stick to the bottom:

if (section == [self.collectionView numberOfSections]-1)
                {
                    CGRect frame = attributes.frame;
                    frame.origin.y = self.collectionView.contentOffset.y + self.collectionView.frame.size.height - 30;
                    attributes.frame = frame;
                }

But, if the last section is pinned to bottom, the collectionview is not able to scroll. If I change frame.origin.y = self.collectionView.contentOffset.y + self.collectionView.frame.size.height - 30;, to frame.origin.y = self.collectionView.contentOffset.y + self.collectionView.frame.size.height + 70;It scrolls little bit downwards until the last section is visible and stops there.

@nipun0505 nipun0505 changed the title Stick last row to bottom Stick last section to the bottom Oct 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant