Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 496
C3332 Avatar asked Feb 01 '15 21:02

C3332


People also ask

How do I underline a label in Xcode?

Select the text of the label, right click and change the font to 'underline'.

How do you underline text in Swift?

swift 3/4/5 Select range of text which you want to underline. Right click and choose Font then select underline.


1 Answers

  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

like image 65
Rizwan Shaikh Avatar answered Sep 28 '22 03:09

Rizwan Shaikh