<!--
{
  "availability" : [
    "iOS: 4.3.0 -",
    "iPadOS: 4.3.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/disablesAutomaticKeyboardDismissal",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)disablesAutomaticKeyboardDismissal"
  },
  "title" : "disablesAutomaticKeyboardDismissal"
}
-->

# disablesAutomaticKeyboardDismissal

Returns a Boolean indicating whether the current input view is dismissed automatically when changing controls.

```
var disablesAutomaticKeyboardDismissal: Bool { get }
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to prevent the dismissal of the input view or <doc://com.apple.documentation/documentation/Swift/false> if the input view may be dismissed.

## Discussion

Override this method in a subclass to allow or disallow the dismissal of the current input view (usually the system keyboard) when changing from a control that wants the input view to one that does not. Under normal circumstances, when the user taps a control that requires an input view, the system automatically displays that view. Tapping in a control that does not want an input view subsequently causes the current input view to be dismissed but may not in all cases. You can override this method in those outstanding cases to allow the input view to be dismissed or use this method to prevent the view from being dismissed in other cases.

The default implementation of this method returns <doc://com.apple.documentation/documentation/Swift/true> when the modal presentation style of the view controller is set to [`UIModalPresentationStyle.formSheet`](/documentation/UIKit/UIModalPresentationStyle/formSheet) and returns <doc://com.apple.documentation/documentation/Swift/false> for other presentation styles. Thus, the system normally does not allow the keyboard to be dismissed for modal forms.

---

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)