2

I am very new in IOS development. I'm having trouble in auto layout, I have a label and "hello" string in it and I'm deleting characters using button click from string. If i don't use auto layout label is not being disappear(while it does not contain a single character). The problem is using auto layout(I have given a standard constrains to top layout),now label is disappearing.

Any one faced the same problem ? have any solution ? Thank you in advanced.

Jeni Khant
  • 350
  • 3
  • 13

1 Answers1

3

In auto layout, width of the label is decided on the length of the constraint if width constraint is not added.

Add a width constraint and the label will remain independent of the length of the text.