Show more button next to end of text Swift

后端 未结 2 670
暖寄归人
暖寄归人 2021-01-05 11:14

I want to show more button at the end of the text or below if there isn\'t enough space. I don\'t understand how Apple developers did this? Please answer in swift. After cli

2条回答
  •  礼貌的吻别
    2021-01-05 11:28

    Here's a great CocoaPod for the functionality you're looking for.

    https://github.com/ilyapuchka/ReadMoreTextView

    This will allow you to set a maximum number of lines and customise the text append to the end of the trimmed text. You can change the font and color since it is an NSAttributedString.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题