---
title: NSUnderlineStyle
framework: uikit
role: symbol
role_heading: Structure
path: uikit/nsunderlinestyle
---

# NSUnderlineStyle

Constants for the underline style and strikethrough style attribute keys.

## Declaration

```swift
struct NSUnderlineStyle
```

## Overview

Overview Use these constants to specify the NSUnderlineStyleAttributeName and NSStrikethroughStyleAttributeName attributes of an attributed string.

## Topics

### Getting the line style

- [single](uikit/nsunderlinestyle/single.md)
- [thick](uikit/nsunderlinestyle/thick.md)
- [double](uikit/nsunderlinestyle/double.md)
- [patternDot](uikit/nsunderlinestyle/patterndot.md)
- [patternDash](uikit/nsunderlinestyle/patterndash.md)
- [patternDashDot](uikit/nsunderlinestyle/patterndashdot.md)
- [patternDashDotDot](uikit/nsunderlinestyle/patterndashdotdot.md)
- [byWord](uikit/nsunderlinestyle/byword.md)

### Initializers

- [init(_:)](uikit/nsunderlinestyle/init(_:).md)
- [init(rawValue:)](uikit/nsunderlinestyle/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [Hashable](swift/hashable.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Getting text content attributes

- [NSWritingDirectionFormatType](uikit/nswritingdirectionformattype.md)
