Skip to content

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

@simonmitchell

Description

@simonmitchell

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions