<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIResponderStandardEditActions/toggleUnderline(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIResponderStandardEditActions(im)toggleUnderline:"
  },
  "title" : "toggleUnderline(_:)"
}
-->

# toggleUnderline(_:)

Toggles the underline style information of the selected text.

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

## Parameters

`sender`

The object calling this method.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)