Reputation: 6470
I have UILabel
in interface builder like this (creating text and use Cmd + =)
but when i run the program on emulator or real device, it looks like this
the answer from here can solve my issue but it isn't the best way because i don't want to create all my label as an IBOutlet for calling sizeToFit
and i also don't want to scale down my text.
is there any way to display text in the device as it shows in interface builder without additional code or configuration?
Thanks
Upvotes: 1
Views: 457
Reputation: 2151
Select your label in the interface builder, and then in the utility area found on the right hand side, go to the "Size Inspector", look for this icon -->
In there you will see options to set your label's origin, width and height
Increase the "width" of your label and that should fix your problem
Upvotes: 1
Reputation: 7639
If you're just strictly not wanting to do any of it in code, simply press Editor -> Size to Fit Content when you have the label selected in IB.
Upvotes: 1