Adding underline to UILabel attributed string from the storyboard fails

后端 未结 6 1900
半阙折子戏
半阙折子戏 2021-01-30 12:22
  1. From the storyboard I select the UILabel in question
  2. Then in Attribute Inspector > Label > [I choose] Attributed
  3. Also in Attribute Inspector > Label > Te
6条回答
  •  忘了有多久
    2021-01-30 13:23

    Here is the solution in storyboard: Open the Attribute Inspector (make sure label is selected), Change the dropdown value from 'Plain' to 'Attributed'. Now a a small text editor will be visible under the font of the label. Select the text of the label, right click and change the font to 'underline'.

    I also have attached a screenshot and successfully underlined a text using storyboard in XCode 7.0.1

提交回复
热议问题