JamitLabs / JamitFoundation

JamitFoundation is a collection of useful concepts to enable composition oriented development with UIKit
MIT License
10 stars 5 forks source link

Extend Collapsible View #69

Closed iComputerfreak closed 4 months ago

iComputerfreak commented 4 months ago

This PR adds fixes an issue with the collapsible views where they would not render content properly when their initial collapsed state was true and the didChangeViewModel() function was called during the initial rendering of the view. To fix this issue, we change the view model's isCollapsed property to make it only the initial state and handle the current view state in the view itself. This also means that any changes to the collapsed state are no longer propagated via the view model's properties, but instead only through the existing didChangeCollapsibleState closure.

This PR also makes the UIView.animate in the collapsible view optional altogether to add the option to work around issues like this in the future.