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 subclassing the collection view layout #104

Merged
merged 2 commits into from
Dec 31, 2017
Merged

Conversation

rechsteiner
Copy link
Owner

Adds a property called menuLayoutClass that allows you to override the
PagingCollectionViewLayout class type. This means you can provide your
own subclass of the layout.

Since the collection view layout type will be set after the
PagingViewController has been initialized we need to wait to initialize
the collection view layout until the view has loaded. This means both
the collectionViewLayout and the collectionView are now optional. This
also means we need to update the initializer for the PagingView. It now
takes the collectionView and the pageView as arguments in the configure
function, which is called after the view has loaded.

Adds a property called menuLayoutClass that allows you to override the
PagingCollectionViewLayout class type. This means you can provide your
own subclass of the layout.

Since the collection view layout type will be set after the
PagingViewController has been initialized we need to wait to initialize
the collection view layout until the view has loaded. This means both
the collectionViewLayout and the collectionView are now optional. This
also means we need to update the initializer for the PagingView. It now
takes the collectionView and the pageView as arguments in the configure
function, which is called after the view has loaded.
Rename enum from InvalidationSummary to InvalidationState. Combine
.everything and .dataSourceCounts into one case. Rename the .partial
case to .nothing.
@rechsteiner rechsteiner merged commit 52919a9 into 1.0 Dec 31, 2017
@rechsteiner rechsteiner deleted the layout-subclass branch December 31, 2017 15:49
@rechsteiner rechsteiner mentioned this pull request Jan 23, 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

Successfully merging this pull request may close these issues.

1 participant