Underline text in a UITextView

前端 未结 13 1448
情歌与酒
情歌与酒 2020-12-14 23:37

How can I underline text in a UITextView. I understand that I would need to create a subclass of UITextView, but what would go under drawRect

13条回答
  •  被撕碎了的回忆
    2020-12-14 23:55

    If this is static text, you can underline it in Interface Builder. Make sure to make the text 'Attributed' first by selecting 'Attributed' in the drop down menu:

    enter image description here

提交回复
热议问题