<!--
{
  "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

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

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

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

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

[`UIScrollView.KeyboardDismissMode.interactive`](/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.

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

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

[`UIScrollView.KeyboardDismissMode.interactiveWithAccessory`](/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.



---

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)