7
votes

I am trying to add a multiline UILabel form code. After reading some questions it seems the answer is to add this:

textLabel.lineBreakMode = NSLineBreakByWordWrapping;
textLabel.numberOfLines = 0;

The problem is I don't see it available in mono touch.

Does anyone know how to do it in mono touch?

Thanks!

1

1 Answers

12
votes

What you're looking for is probably the LineBreakMode property of UILabel, which takes a UILineBreakMode enum value. So something like this:

textLabel.LineBreakMode = UILineBreakMode.WordWrap;
textLabel.Lines = 0;