---
title: "toggleUnderline(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiresponderstandardeditactions/toggleunderline(_:)"
---

# toggleUnderline(_:)

Toggles the underline style information of the selected text.

## Declaration

```swift
optional func toggleUnderline(_ sender: Any?)
```

## Parameters

- `sender`: The object calling this method.

## Discussion

Discussion Use this method to apply or remove style information to the currently selected content.

## See Also

### Handling styled text editing

- [toggleBoldface(_:)](uikit/uiresponderstandardeditactions/toggleboldface(_:).md)
- [toggleItalics(_:)](uikit/uiresponderstandardeditactions/toggleitalics(_:).md)
