The setFrame method of AQGridView used to only call handleGridViewBoundsChanged if the bounds width actually changes. (This to prevent unnecessary work if setFrame is called again with same bounds I suppose) But there are cases when the height will change and the grid content height needs to be recalculated appropriately. This patch detects a change to height as well so that happens.
In my case a large 3x4 (portrait) and 4x3 (landscape) grid table is displayed in a view with a navigation bar. A cell is selected causing another view to be pushed on the stack. That view is rotated and we return to the grid. SetFrame is called twice, the 1st time it resets the frame height & width to the new orientation, BUT without accounting for the navigation bar. The 2nd time it resets the frame to account for the bar, but the width is the same. The old logic bypassed the logic I added to the parent branch that recalculates the current content offset proportionally to the height so the content stays in view. So the 1st time setFrame is called the cells are all calculated to be a little taller (to fit) and depending on the size of the table and how far down you scrolled results in the view showing cells that are a number of rows away from those shown before the rotation.
The setFrame method of AQGridView used to only call handleGridViewBoundsChanged if the bounds width actually changes. (This to prevent unnecessary work if setFrame is called again with same bounds I suppose) But there are cases when the height will change and the grid content height needs to be recalculated appropriately. This patch detects a change to height as well so that happens.
In my case a large 3x4 (portrait) and 4x3 (landscape) grid table is displayed in a view with a navigation bar. A cell is selected causing another view to be pushed on the stack. That view is rotated and we return to the grid. SetFrame is called twice, the 1st time it resets the frame height & width to the new orientation, BUT without accounting for the navigation bar. The 2nd time it resets the frame to account for the bar, but the width is the same. The old logic bypassed the logic I added to the parent branch that recalculates the current content offset proportionally to the height so the content stays in view. So the 1st time setFrame is called the cells are all calculated to be a little taller (to fit) and depending on the size of the table and how far down you scrolled results in the view showing cells that are a number of rows away from those shown before the rotation.