Search code examples
iostextattributesstoryboarduilabel

Adding underline attribute to partial text UILabel in storyboard


How can I underline partial text of UILabel using only storyboard? I am able to do this in code and I'm able to underline the entire text of a label, but not just one or two words in the string.


Solution

    1. select the UILabel and go to Attribute Inspector section.
      Change the text value from plain to Attributed .

      enter image description here

    2. Select the particular part of text which you want to Underline .

      Note: If u want full text to be Underline select full text.

      enter image description here

    3. Now right click and change the font to Underline.

      enter image description here

    It will Underline the text

    enter image description here