DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

CollectionView reloadSections doesn't remove any text or images

Open ivancantarino opened this issue 8 years ago • 6 comments

Hello. So I was testing this library, which everyone talks so good about and I've ran into an issue with it. In my app, after fetching some data I call self.collectionView?.reloadSections((NSIndexSet(index: 0) as IndexSet)) so I can reload the first section in my UICollectionView but as I do that, I've noticed the DZNEmptyDataSet title, image, description doesn't get removed, but it stays visible, overlapping the cells itself.

If I switch from the reloadSections(:) to the good old reloadData() it works as expected.

I've looked around and couldn't find any bug report like this one so I think this might need a fix somehow.

Everything else works as expected. 😉

ivancantarino avatar Jan 20 '18 18:01 ivancantarino

Sounds like you may have more than just 1 section?

dzenbot avatar Jan 24 '18 19:01 dzenbot

I don’t. Only 1 section

Sent with GitHawk

ivancantarino avatar Jan 24 '18 19:01 ivancantarino

+1,How to solve the issue?

yangzheng006 avatar Feb 24 '18 06:02 yangzheng006

@yangzheng006 @dzenbot actually there's not a solution for it -- I have to call reloadData() 😢

ivancantarino avatar Feb 24 '18 10:02 ivancantarino

yeah, that one is very frustrating... when one uses RxDataSource it often uses reload sections...

matthewfx avatar Aug 29 '18 04:08 matthewfx

I had the same issue using tableview.reloadData(with: .automatic) and solve the issue by calling tableview.reloadEmptyDataSet()

flovaguet avatar Nov 25 '19 10:11 flovaguet