<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIScrollViewKeyboardDismissMode"
  },
  "title" : "UIScrollView.KeyboardDismissMode"
}
-->

# UIScrollView.KeyboardDismissMode

Constants that determine how the system dismisses the keyboard when a drag begins in the scroll view.

```
enum KeyboardDismissMode
```

## Overview

You use these constants to set the value of the [`keyboardDismissMode`](/documentation/UIKit/UIScrollView/keyboardDismissMode-swift.property) property.

## Topics

### Constants

[`UIScrollViewKeyboardDismissModeNone`](/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum/none)

A mode in which a drag doesn’t dismiss the keyboard.

[`UIScrollViewKeyboardDismissModeOnDrag`](/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum/onDrag)

A mode in which the keyboard dismisses when a drag begins.

[`UIScrollViewKeyboardDismissModeInteractive`](/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum/interactive)

A mode in which the keyboard follows the dragging touch offscreen, and can be pulled upward again to cancel the dismiss.

[`UIScrollViewKeyboardDismissModeOnDragWithAccessory`](/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum/onDragWithAccessory)

A mode in which the keyboard and accessory view dismiss together when a drag begins.

[`UIScrollViewKeyboardDismissModeInteractiveWithAccessory`](/documentation/UIKit/UIScrollView/KeyboardDismissMode-swift.enum/interactiveWithAccessory)

A mode in which the keyboard and accessory view both follow the dragging touch offscreen, and can be pulled upward again to cancel the dismiss.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)