1

everybody, this is my question:

i have a UILabel that displays the hour with seconds in the format HH:mm:ss. But, the content of the label always move to the right when the seconds are: '01' because the number 1 is "smaller" than the width of the number 9.

i had unchecked "Adjust to fit" in IB and setAdjustsFontSizeToWidth:NO but that did not solve the problem.

I think the answer is there in IB but anything seems to work.

Any idea ??

highlycaffeinated
  • 19,729
  • 9
  • 60
  • 91
Davidman
  • 13
  • 3

1 Answers1

1

You can use this which is inherited from UIView:

@property(nonatomic) BOOL autoresizesSubviews

and set it to false, if you just don't want the UILabel to autoresize.

Oscar Gomez
  • 18,436
  • 13
  • 85
  • 118