Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make UILabel wordwrap

Is there anyway of making a UILabel wrap to the next line or do I have to use a UITextView?

like image 842
TheLearner Avatar asked Jan 07 '11 14:01

TheLearner


People also ask

How do I change my UILabel?

Change Font And Size Of UILabel In Storyboard To change the font or the size of a UILabel in a Storyboard or . XIB file, open it in the interface builder. Select the label and then open up the Attribute Inspector (CMD + Option + 5). Select the button on the font box and then you can change your text size or font.

What is UILabel?

A view that displays one or more lines of informational text.


1 Answers

You would need to set the numberOfLines property to 0 and explicitly specify its dimensions, either in IB or programmatically. However, if you have a lot of text to display, I would recommend using a UITextView.

like image 200
Evan Mulawski Avatar answered Oct 19 '22 18:10

Evan Mulawski