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

Create DeclarativeSection and override header/footer methods in TableViewController for when the section is DeclarativeSection #68

Merged
merged 2 commits into from Jun 4, 2021

Conversation

BenShutt
Copy link
Contributor

@BenShutt BenShutt commented Feb 1, 2021

Create DeclarativeSection for common usage of declarative UITableView Sections

Motivation and Context

A common use case, allows programmers to define Section logic in the redraw rather than overriding UITableViewDelegate methods.

How Has This Been Tested?

Used in other company apps

Usage:

func redraw() {
    data = [
        DeclarativeSection(rows: [textRow]),
        DeclarativeSection(rows: answerRows, headerHeight: 16),
        DeclarativeSection(rows: answerRows, headerHeight: UITableView.automaticDimension, headerView: UILabel.header)
    ]
}

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…bleViewController` for when the section is `DeclarativeSection`
@BenShutt BenShutt merged commit 1a60836 into develop Jun 4, 2021
@BenShutt BenShutt deleted the feature/declarative-section branch June 4, 2021 12:05
@BenShutt BenShutt mentioned this pull request Jun 4, 2021
9 tasks
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.

None yet

3 participants