Hi I have a collection view which has collectionview cell with a outer stack view containing a uibutton and another stack view inside it.
It is a collapsible collection view as I click the uibutton in the cell, it must hide the inner stack view with animation. How to do this
Collection view cell
Content view
Stack view
Uibutton
Stack view
I want to hide the inner stack view with animation on selecting the UI button
Cell Code
func setupUI(_ hidden: Bool, filter: Filter) {
self.filter = filter
UIView.performWithoutAnimation {
expandableStackView.isHidden = hidden ? false : true
self.filterTitleButton.setTitle(filter.filterTitle, for: .normal)
}
}
In Controller cell for row i will call this setUpUI function