---
title: NSUnderlineStyle
framework: appkit
role: symbol
role_heading: Structure
path: appkit/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](appkit/nsunderlinestyle/single.md)
- [thick](appkit/nsunderlinestyle/thick.md)
- [double](appkit/nsunderlinestyle/double.md)
- [patternDot](appkit/nsunderlinestyle/patterndot.md)
- [patternDash](appkit/nsunderlinestyle/patterndash.md)
- [patternDashDot](appkit/nsunderlinestyle/patterndashdot.md)
- [patternDashDotDot](appkit/nsunderlinestyle/patterndashdotdot.md)
- [byWord](appkit/nsunderlinestyle/byword.md)

### Deprecated

- [init(rawValue:)](appkit/nsunderlinestyle/init(rawvalue:).md)
- [init(_:)](appkit/nsunderlinestyle/init(_:).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](appkit/nswritingdirectionformattype.md)
