As you can see, I have a UIView(red color) that has constraints - leading, bottom, width and height. All set to default(1000) priorities except height(999). Inside this UIView are three UIButtons those have constraints - leading, top, width and height. All set to default(1000) priorities except height (2). So that superview's height can override the innerviews height. At the click of orange button. I set UIView's height constant to 0.
And the result is this - in pic below. At bottom you can see content(text) is not compressed to hide itself. What should I do. I have played with vertical compression resistance. Please don't say set buttons to hidden etc.