I want to hide a label if the labels text value is empty. I have no trouble checking this but if I use [label setHidden:YES] it still leaves the space.
I’m adding this label in Interface Builder by the way.
I have tried using [label setFrame: CGRectZero], but the label keeps taking up space!
What shall I do?
Hiding or removing a view does not affect the position of other subviews of the view’s parent.
If you have a column of labels, and don’t want empty labels to take up space, you will need to adjust the location of the other labels in the column to shift those below the hidden label up.