Closed AnthoPakPak closed 6 years ago
I've succeeded in hiding/showing groups, if anyone is interested, feel free to ask me :) I'm not making a PR as I don't know if people are interested in this feature.
Hi @AnthoPakPak!
I'm curious to see it, do you have a fork laying around that I can have a look? 😀
Hi @3lvis :)
With pleasure, I've just pushed the code ;)
Indeed, I've made a few improvements in the lib to fit my needs. Code may (must!) need refactoring/cleaning/testing, but it works great on my side.
Some features :
Here is the link to the forked project : https://github.com/AnthoPakPak/FormCustom
By the way, I would like to thank you and other contributors for this awesome library 👏
I've succeeded in animating show/hide groups, added to the repo ;)
🔥 🔥 🔥 🔥 🔥 🔥 🔥
@AnthoPakPak thanks for this great work. Could you point me to the changes made to fix this:
@jeffleeismyhero Sure :)
https://github.com/AnthoPakPak/FormCustom/blob/master/Source/FORMLayout.m#L158 and https://github.com/AnthoPakPak/FormCustom/blob/master/Source/FORMLayout.m#L178
I had to encapsulate the code in a @try @catch block to avoid out of bounds as a casual check (if (lastIndexPath.row < fields.count)
) returned true, but the concurrency will change number of fields on the same time, which cause out of bounds.
The bug happened for me when changing value of segment, with show target on value, but ONLY if fields of next group (section in UICollectionView) are visible.
Ask me if any other informations are needed :)
Does anybody has an idea on how to show/hide groups like we can do with targets on fields/sections (even outside of json) ?
I've tried many things, such as removing the cells from collectionView (as groups are composed of cells), but it mess with IDs so I thought it wasn't a good start. I've also tried to collapse group + hide header, but it's not perfect as it leaves a small space (can be tweaked but there must be an easier way).
I think that removing/restoring the cells could be the best thing to do, but I would need some help to implement it.
Any help is appreciated :)