CHTCollectionViewWaterfallLayout icon indicating copy to clipboard operation
CHTCollectionViewWaterfallLayout copied to clipboard

Strange behaviour

Open aleksandrach opened this issue 9 years ago • 8 comments

Hey,

I am using two sections, the top one for presenting user data, and the other one for user posts. It should look like the first screenshot. But sometimes it looks like the second screenshot, the second section cells overlap first section. simulator screen shot aug 17 2016 11 41 39 img_1034

aleksandrach avatar Aug 18 '16 08:08 aleksandrach

Hey,

any news here?

aleksandrach avatar Aug 22 '16 12:08 aleksandrach

no idea

chiahsien avatar Aug 22 '16 16:08 chiahsien

i got same error

humza-ios avatar Oct 20 '16 08:10 humza-ios

This is happening if you have at some moment numberOfItemsInSection = 0. I fixed this by adding "placeholder" cell every time the list is empty, and then numberOfItemsInSection = 1 or if it's not empty, it's list.count. But this is a temporary solution.

aleksandrach avatar Oct 20 '16 08:10 aleksandrach

This is happening if you have at some moment numberOfItemsInSection = 0.

Do you mean that numberOfItemsInSection = 0 during scrolling, or? Can you provide steps to reproduce this issue?

chiahsien avatar Oct 20 '16 09:10 chiahsien

For example, when the screen is opened, the list is empty, the collection view's delegate and data source methods are called, then we get the list from the server and reload the collection. The issue is happening at the moment before the list is fetched from the server, because numberOfItemsInSection = list.count = 0;

aleksandrach avatar Oct 20 '16 09:10 aleksandrach

@aleksandrach Can you provide sample project? I also use this layout to present data fetching from server, but it never happens to me.

chiahsien avatar Oct 20 '16 09:10 chiahsien

Here is sample of the class that is implementing this screen. It has two sections, top one for the profile information and second one, the posts. You can see the screenshot in my first comment.

Sample1.txt

aleksandrach avatar Oct 20 '16 09:10 aleksandrach