nlampi / SwiftGridView

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

scrollToCellAtIndexPath conflicts with frozen rows and columns. #35

Closed robcecil closed 6 years ago

robcecil commented 6 years ago

Attempts to "scroll to top" (0,0,0) work fine, even with frozen rows. (atScrollPosition: .top)

Attempts to scroll to other rows yield unexpected results, depending upon how many frozen rows are present- sometimes the grid will be scrolled underneath the frozen rows.

Using a datasource with 188 rows, attempting to scroll to row 50, for instance, will yield rather poor results, even varying the atScrollPosition (.top, .centerVertically).

Worse failure is attempting to scroll to the last row, using atScrollPosition: .bottom), which causes the frozen rows to disappear.

nlampi commented 6 years ago

That should definitely not be the case! Will take a look at this.

nlampi commented 6 years ago

I have pushed a new version 0.6.3 which should address this issue. Now frozen rows should properly be accounted for. Also, it should not be possible to push the content area into an invalid state when scrolling to rows. (e.g. row 188 bottom)

robcecil commented 6 years ago

Works great! Thanks @nlampi