I have UILabel right now and the value of UILabel.text changes regularly.
The problem is that if each time the value of UILabel.text changes, the width of the UILabel changes according to the contents of the label.
How can i fix this? This is my code that I have right now:
outputLabel.text = errorMessage;
outputLabel.hidden = NO;
[outputLabel sizeToFit]
UPDATE
The reason I use sizeToFit is because I need the height to automatically change.
Thanks,
Peter
source
share