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

Add property to list page to remove table view header where appropriate #269

Open
simonmitchell opened this issue Jun 26, 2020 · 0 comments

Comments

@simonmitchell
Copy link
Contributor

In a lot of our apps we remove the tableViewHeader (Set it to near-zero frame) based on the first cell on ListPage this logic is normally fairly complex, but identical across all apps. This should be moved to a static property on ListPage which will allow us to set this before launch so ThunderCloud can handle all the logic required. Example of logic:

guard let firstRow = data.first?.rows.first, firstRow is ImageListItem || firstRow is HeaderListItem || firstRow is CollectionListItem || firstRow is SpotlightListItem else {
    return
}
tableView.tableHeaderView = UIView(frame: CGRect(x: 0, y: 0, width: 0.1, height: 0.1))
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