Skip to main content

Hello everyone! I am struggling with auto-formatting the text style shown below. What I want is to have the underline expand with the text.

 

The intended visual of the underlay underline

However, when I apply auto-layout and try to hack things a bit, the underline is either right below the text or the text is being covered by the underline (shown below).

 

Would any of you have an idea of how to get the desired result?

In your auto layout:

  1. Make the underline “ignore layout”
  2. Then set it’s constraints like so:

 


Genius! Thanks so much, Shiv!