Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

Issue with UICollectionReusableView #180

Closed shuhrat10 closed 7 years ago

shuhrat10 commented 7 years ago

I noticed, when I'm using UICollectionReusableView from storyboard I'm getting additional view on top of mine. This second UICollectionReusableView is not allowing me to use gesture correctly.

1

rnystrom commented 7 years ago

@shuhrat10 What is the UICollectionReusableView for? A supplementary header view? Your storyboard looks like there's an extra view put in the collection view. Is that a prototype cell or an actual view?

shuhrat10 commented 7 years ago

Header and Footer is UICollectionReusableView. I noticed when you added header or footer to CollectionView via storyboard and then debug this ViewController via "Debug view hierarchy" you will see addition UICollectionReusableView. I don't figured out yet why is it happening. It's not issue in IGListKit. @rnystrom

rnystrom commented 7 years ago

Hmm, ya if its not a prototype cell I bet the view is actually being created and inserted into the collection view's hierarchy. You probably want to create a prototype cell (it'll be UICollectionViewCell) and then use that cell class+identifier for your supplementary views.

If this isn't an issue w/ IGListKit, can we close this issue?

jessesquires commented 7 years ago

👍

shuhrat10 commented 7 years ago

When you start using SupplementaryView for header or footer, xCode will added one more to the view hierarchy. I think it's a bug in xCode.

bug

So if you want change zIndex SupplementaryView in order to hide behind the cell, don't do it. Instead, change zIndex for the cell.

Yes, you can close this ticket.