Contents

underline(_:pattern:color:)

Applies an underline to the text.

Declaration

nonisolated func underline(_ isActive: Bool = true, pattern: Text.LineStyle.Pattern, color: Color? = nil) -> Text

Parameters

  • isActive:

    A Boolean value that indicates whether underline styling is added. The default value is true.

  • pattern:

    The pattern of the line.

  • color:

    The color of the underline. If color is nil, the underline uses the default foreground color.

Return Value

Text with a line running along its baseline.

See Also

Styling the view’s text