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

Allow setting different width for selected cell #85

Merged
merged 1 commit into from
Nov 25, 2017

Conversation

rechsteiner
Copy link
Owner

The widthForPagingItem delegate now has a new argument called
isSelected which can be used to return a different width for the
currently selected cell. Parchment will then tween between the selected
width and the default width when swiping between items.

If you implement the width delegate, the collection view layout will
invalidate all the layout attributes as you are scrolling. The menu
item sizes are cached so they are not re-calculated all the time.

The widthForPagingItem delegate now has a new argument called
isSelected which can be used to return a different width for the
currently selected cell. Parchment will then tween between the selected
width and the default width when swiping between items.

If you implement the width delegate, the collection view layout will
invalidate all the layout attributes as you are scrolling. The menu
item sizes are cached so they are not re-calculated all the time.
@rechsteiner rechsteiner merged commit 5c0bff4 into master Nov 25, 2017
@rechsteiner rechsteiner deleted the selected-width branch November 25, 2017 15:16
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.

1 participant