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 SupplementaryViewKind #56

Closed
jessesquires opened this issue Jan 24, 2018 · 0 comments
Closed

Fix SupplementaryViewKind #56

jessesquires opened this issue Jan 24, 2018 · 0 comments
Assignees

Comments

@jessesquires
Copy link
Contributor

Our model here is incorrect.

public enum SupplementaryViewKind is simply wrong.

kind should be a property on SupplementaryViewInfo

Like I mentioned in #55, supplementary views can be arbitrary. So can kind.

For example, you can use the same cell prototype and reuseIdentifier, but different kind specifiers. We currently can't support this.

Practical use case: a cell with a label could be used as a header and footer.

@jessesquires jessesquires self-assigned this Jan 25, 2018
jessesquires added a commit that referenced this issue Jan 26, 2018
- remove hidden supplementary view hacks, close #47
- fix `SupplementaryViewKind` models, close #56
    - `RegistrationMethod` --> `ViewRegistrationMethod` (and remove nesting, since this will apply to all cells in #18)
    - make `kind` a property of `SupplementaryViewInfo`
- Remove `typealias Section`, only used in one place and doesn't add any value
jessesquires added a commit that referenced this issue Jan 26, 2018
This still needs all kinds of work to correctly model how collection view supplementary views work, but this is a start.
We're artificially (and implicitly) restricted to headers and footers. We'll probably have to keep this limitation for 1.0.
This aims to make a more general transition easier.

- Make `kind` a property of `SupplementaryViewInfo`
- Make `ViewRegistrationMethod` a proper type on its own (which we can use for cell registration in #18)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant