AlanQuatermain / AQGridView

A grid view for iPhone/iPad, designed to look similar to NSCollectionView.
http://quatermain.tumblr.com/
BSD 3-Clause "New" or "Revised" License
2.37k stars 450 forks source link

reloaddata does not wipe out older cells #205

Open vividcode opened 10 years ago

vividcode commented 10 years ago

Basically I need to handle orientation change while keeping the number of columns constant (2).

So I call reloaddata because that is the only way I know of how to tell AQGridView newer cell size through portraitGridCellSizeForGridView.

This works as intended the first time when I change orientation from Portrait to Landscape. However, when I again change to Portrait back, the bigger sized cells from Landscape orientation do not disappear. They are visible along with newer Portrait sized cells.

I think this is due to the fact that reloaddata simply removes and recreates cells within _visibleCells array.

But I want to know what is proper way to handle orientation because I know reloading should not be the way to do it.