How to handle long text labels on a generic storyboard?

If the label text in a generic storyboard is too long to fit some , how do I place it?

View storyboard

Storyboard View

IPhone 6 emulator

iPhone 6 Emulator

I'm not sure if there is a suitable way to do this as recommended, but I would suggest that I would either wrap the text across multiple lines or automatically adjust the font size.

+3


source to share


2 answers


Here is a simple gif to help you understand it better.



enter image description here

+10


source


You can do it. Set limits first so that the UILabel doesn't go past the edge of the screen. Then you have two options. Either set the minimum font size to set the number of lines to 0 (or both).

All of these settings can be set in the storyboard.



Edit the following comment

Constraints are usually set in the storyboard and define how the view is created based on the device being used. This is a large and important subject and Ray Wenderlich has a very good two-part tutorial.

+2


source







All Articles