Underlining text in UIButton

RVN picture RVN · Apr 13, 2010 · Viewed 95.3k times · Source

Can anyone suggest how to underline the title of a UIButton ? I have a UIButton of Custom type, and I want the Title to be underlined, but the Interface Builder does not provide any option to do so.

In Interface Builder when you select the Font Option for a Button, it provides option to select None, Single, Double, Color but none of these provide any changes to the Title on the Button.

Any help appreciated.

Answer

finneycanhelp picture finneycanhelp · Nov 14, 2014

To use interface builder to underline, one has to:

  • Change it to attributed
  • Highlight the text in the Attributes inspector
  • Right click, choose Font and then Underline

Underline using IB

Video someone else made https://www.youtube.com/watch?v=5-ZnV3jQd9I