What is the best way to remove auto layout constraints for a Cell when a view should not be shown?
We have a cell which has a layout with around 6-7 views. One of those views is for a star rating. When the star rating is not available we do not want to show the view. At present we hide the view but this leaves the auto layout constraints in place.
Similar question - How to use auto-layout to move other views when a view is hidden?
This is the view in question hilighted above. We would ideally like to remove this view from its superview when there is no available star rating. The issue we have is that if we remove the view from superview removeFromSuperview
in cellForRow...
then the next cell would be affected, because the view is not added again.