---
title: kCTUnderlineStyleAttributeName
framework: coretext
role: symbol
role_heading: Global Variable
path: coretext/kctunderlinestyleattributename
---

# kCTUnderlineStyleAttributeName

The style of underlining, to be applied at render time, for the text to which this attribute applies.

## Declaration

```swift
let kCTUnderlineStyleAttributeName: CFString
```

## Discussion

Discussion Value must be a CFNumber object. Default is kCTUnderlineStyleNone. Set a value of something other than kCTUnderlineStyleNone to draw an underline. In addition, the constants listed in  CTUnderlineStyleModifiers can be used to modify the look of the underline. The underline color is determined by the text’s foreground color.

## See Also

### Constants

- [kCTCharacterShapeAttributeName](coretext/kctcharactershapeattributename.md)
- [kCTFontAttributeName](coretext/kctfontattributename.md)
- [kCTKernAttributeName](coretext/kctkernattributename.md)
- [kCTLigatureAttributeName](coretext/kctligatureattributename.md)
- [kCTForegroundColorAttributeName](coretext/kctforegroundcolorattributename.md)
- [kCTForegroundColorFromContextAttributeName](coretext/kctforegroundcolorfromcontextattributename.md)
- [kCTParagraphStyleAttributeName](coretext/kctparagraphstyleattributename.md)
- [kCTStrokeWidthAttributeName](coretext/kctstrokewidthattributename.md)
- [kCTStrokeColorAttributeName](coretext/kctstrokecolorattributename.md)
- [kCTSuperscriptAttributeName](coretext/kctsuperscriptattributename.md)
- [kCTUnderlineColorAttributeName](coretext/kctunderlinecolorattributename.md)
- [kCTVerticalFormsAttributeName](coretext/kctverticalformsattributename.md)
- [kCTGlyphInfoAttributeName](coretext/kctglyphinfoattributename.md)
- [kCTRunDelegateAttributeName](coretext/kctrundelegateattributename.md)
- [kCTBaselineOffsetAttributeName](coretext/kctbaselineoffsetattributename.md)
