Home  >  Q&A  >  body text

objective-c - Labels that exceed a certain number of lines are forced to add a... at the end to expand and can be clicked into the full text

A lable, if the number of words exceeds 3 lines, it will be displayed...add a picture to the full text>, has anyone done this function before?

As shown in the picture above.

滿天的星座滿天的星座2712 days ago890

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 13:21:16

    Provide an idea:
    You can limit the height and perform processing when it reaches a certain height.

    reply
    0
  • 为情所困

    为情所困2017-05-16 13:21:16

    If you use constraints, you can set the constraints to less than one size at the beginning, vfl can be @"V:[label(<=margin)]-10-[picture below]", click on the full text to update the constraints@" V:[label]-10-[Picture below]"

    reply
    0
  • Cancelreply