Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

String doesn't fit in label

In my project, when I click a button, some text should appear in a label, the problem is that the whole text doesn't fit in the label, how do i make the text fit correctly?

I expand the label to the edges of the simulator and make it bigger from height but nothing changes.

1 Answer

Matthew Long
Matthew Long
28,407 Points

You can do what you're wanting in the Interface Builder. If you are following along with the build a simple app course, you will get to this later. If you're working ahead then you can do this by setting the number of lines to zero. I believe this option is in the attributes inspector.