chiahsien / CHTCollectionViewWaterfallLayout

The waterfall (i.e., Pinterest-like) layout for UICollectionView.
MIT License
4.54k stars 701 forks source link

Cell order changed when reload data #120

Open CocaCola183 opened 8 years ago

CocaCola183 commented 8 years ago

When I reload, I found the cell's order changed, how can I keep the original order of cell?

chiahsien commented 8 years ago

Are cells' heights changed?

emjoseph commented 7 years ago

Yeah I'm getting the same behavior. Cell heights have not changed. Works correctly the first time reloadData is called, but heights reversed on subsequent calls

emjoseph commented 7 years ago

Also I'm running the Swift 3 version

emjoseph commented 7 years ago

@CocaCola183 were you able to resolve this issue on your own?

emjoseph commented 7 years ago

Was able to resolve the issue. Not a problem with the library but the way I was handling the reuse of my cells. The collectionViewCell's contentView frame was not updating on reuse hence the perceived reverse order

hai2014bk commented 6 years ago

@emjoseph how did you solve it ?