intuit / CardParts

A reactive, card-based UI framework built on UIKit for iOS developers.
Other
2.52k stars 225 forks source link

Collapsable Card Parts #143

Closed juliusbtesh closed 5 years ago

juliusbtesh commented 5 years ago

Is it easy to implement a collapsable/expandable card part using what we have here?

croossin commented 5 years ago

You may use the idea of CardStates in order to set different CardParts for different states. So you may have an opened state and a closed state and when you change in between it will set the currently visible CardParts to whatever you have inputted for that selected state. Let me know if you still need help or if that pointed you in the correct direction!

juliusbtesh commented 5 years ago

Thanks! I will look into this

juliusbtesh commented 5 years ago

@croossin So I gave this a try and it is a bit weird how it seems to be working.

First : It doesnt seem like I can reuse the same card part from a different state (Unless Im just not setting it properly) Second : Is there an easy way to get an animation like the card "expanding"/"collapsing" - At the moment when I switch states it just displays the "expanded" card but it seems very weird.

Thanks!