jessesquires / jessesquires/ReactiveCollectionsKit

Allow changing layouts?

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
difficulty: hard feature request priority: low
Dominant language
Swift
Stars
194
Forks
12
PR merge metrics
No merged PRs in 30d

Description

At the moment, the library doesn't necessarily care about a specific layout and doesn't explicitly assume a constant layout.

However, I'm not sure what happens if you currently attempt to do this. I suspect the data source would throw an exception if your new layout is radically different and uses different cell classes.

Collection View allows you to animate transitions to another layout:
- https://developer.apple.com/documentation/uikit/uicollectionview#1657143

Plus, delegate methods:
- https://developer.apple.com/documentation/uikit/uicollectionviewdelegate#1656914

In order to accommodate this, we'd have to:

1. update the view model (and cell registrations), but not perform a diff/reload yet
2. update the layout
3. reload?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.