nlampi / SwiftGridView

Swift based data grid view.
MIT License
58 stars 15 forks source link

What is the equivalent of "Frozen Rows" ? #13

Closed robcecil closed 7 years ago

robcecil commented 7 years ago

What if I have only one section, and I want to define multiple frozen rows?

Thanks

nlampi commented 7 years ago

Currently there isn't an ability to add frozen rows. This could definitely be an enhancement that can be added though.

nlampi commented 7 years ago

I have pushed a new version 0.3.5 which adds the datasource numberOfFrozenRowsInSection method call. Can you test out and let me know if you have any issues?

robcecil commented 7 years ago

Ok, will do thanks

robcecil commented 7 years ago

Nathan, this works pretty well.

Question:

If I turn off section headers & footers and Grid headers & footers in the sample:

 func heightForGridHeaderInDataGridView(_ dataGridView: SwiftGridView) -> CGFloat {

        return 0
    }

    func heightForGridFooterInDataGridView(_ dataGridView: SwiftGridView) -> CGFloat {

        return 0
    }

    func dataGridView(_ dataGridView: SwiftGridView, heightOfHeaderInSection section: Int) -> CGFloat {

        return 0
    }

    func dataGridView(_ dataGridView: SwiftGridView, heightOfFooterInSection section: Int) -> CGFloat {

        return 0
    }

How would I style the frozen rows & columns differently? cellAtIndexPath?

nlampi commented 7 years ago

Yes I would either change the style of the cell for those index paths, or have a separate cell class for those cells. Either way can be used to update the look/feel.