I used NSImageView with a text view near to it. The text view was having leading constraint to the image view, moreover when I hide the image the constraint it seems to be as it is, but when I embedded the image view inside a custom view and hided the whole custom view, the problem was solved and the text view took the whole space of the custom view without any extra padding.
Why this happened, and why hiding the image view keeps the constraints while embedding it in a custom view and hiding the whole custom view didn't ?