Underline button text in Swift

后端 未结 14 2100
暖寄归人
暖寄归人 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:31

    Here is done on the storyboard. (Xcode 9.1)

    1. Select the Button object in your view.
    2. Open Fonts Settings

    1. Select Single Underline

    1. Type your text, press [Enter]

提交回复
热议问题