1

In Storyboard, is it possible to set the maximum number of lines in a UITextView similar to how you can with a UILabel? All the other SO posts only show programmatic solutions.

Crashalot
  • 33,605
  • 61
  • 269
  • 439

2 Answers2

5

You can do it with User Defined Runtime Attributes for this view. Select your UITextView, open Identity inspector, and add new attribute. Enter textContainer.maximumNumberOfLines to key path, select Number as type and put your number to Value field.

enter image description here

rkyr
  • 3,131
  • 2
  • 23
  • 38
-1

First of all make Text as "Attributed" and then select button which is shown in below image..enter image description here

It may be helpful to you.. Thanks..

yankit Patel
  • 331
  • 1
  • 12