-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work properly with auto layout cell sizing #5
Comments
Hey @damienrambout. Thanks for that. I'm not familiar with what This class just hijacks the I will investigate when I can. Feel free to dig deeper! |
Thank you very much! I spent the last two days trying to figure out why my swift implementation wasn't working and now I see this post... I came to the exact same conclusion that @damienrambout pointed out. If you come up with something please let me know! I'll do the same. |
One solution, which is not efficient but works, is to use the existing implementation of
|
Hi guys, I am running into the same issue with auto-layout based cells, but I believe I have come a good way at hunting this down. When I am laying it out, I don't get the nice spacing I used to before individual cell sizing, I can get to getting nice spacing if I in
just The really interesting thing is that if I rotate, and then rotate back, I get the expected look: You can find the project here: https://github.com/skylib/SnapTagsView/tree/DemoForKTCenterFlowLayout and the function referred to above lives in SnapTagsView/SnapTagCell.swift. Just run the example app in it and you'll see exactly what I mean. (you'll need to do a Cheers |
thanks @niklassaers i'll check it out |
I'm also noticing that this layout class does not seem to work with auto sizing collection view cells. Anyone know any alternatives? 😅 I'll probably just be left-aligning for now |
When I set a
estimatedItemSize
on the collection view layout and use auto-layout to define the size of my cells (hence, not implementing- (CGSize)collectionView:layout:sizeForItemAtIndexPath:
),KTCenterFlowLayout
does not work anymore.Since iOS 8, it's very usual to use auto-layout for
UICollectionViewCell
automatic sizing (as well asUITableViewCell
automatic height).The text was updated successfully, but these errors were encountered: