Underline button text in Swift

后端 未结 14 1831
暖寄归人
暖寄归人 2021-01-30 10:26

I have UIButton. In interface builder I set its title to be \'Attributed\'. How can I make its title to be underlined from code in Swift?

@IBOutlet weak var myBt         


        
14条回答
  •  清酒与你
    2021-01-30 10:40

    StoryBoard: If you want to Underline text from storyBoard.

    • Select button or label title as Attributed.
    • Select range of text which you want to underline.
    • Right click and choose Font then select underline.

提交回复
热议问题