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

Fix/collection view resizing #49

Merged
merged 6 commits into from
Oct 15, 2015
Merged

Conversation

richardtop
Copy link
Contributor

Not the best piece of code I wrote, but it works flawlessly.
Before: https://youtu.be/cdGz0pHzVFQ
After: https://youtu.be/eSbhP-tDn5k

galleryView.collectionView.frame.size.height = galleryView.frame.size.height - ImageGalleryView.Dimensions.galleryBarHeight
galleryView.collectionSize = CGSize(width: galleryView.collectionView.frame.height, height: galleryView.collectionView.frame.height)
let value = self.view.frame.width * (scale - 1) / scale
self.galleryView.collectionView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to reference self here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. 👍

zenangst added a commit that referenced this pull request Oct 15, 2015
@zenangst zenangst merged commit ca5a03b into master Oct 15, 2015
@zenangst zenangst deleted the fix/collection-view-resizing branch October 15, 2015 13:01
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

Successfully merging this pull request may close these issues.

2 participants