<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIKeyboardLayoutGuide",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIKeyboardLayoutGuide"
  },
  "title" : "UIKeyboardLayoutGuide"
}
-->

# UIKeyboardLayoutGuide

A layout guide that represents the space the keyboard occupies in your app’s layout.

```
@MainActor class UIKeyboardLayoutGuide
```

## Overview

Configure the keyboard layout guide, and activate or deactivate constraints so your app’s layout adjusts to the keyboard in different situations. See [Adjusting your layout with keyboard layout guide](/documentation/UIKit/adjusting-your-layout-with-keyboard-layout-guide) for an example of how to dynamically respond to keyboard presentation, dismissal, and movement.

## Topics

### Supporting floating and undocked keyboards

[`followsUndockedKeyboard`](/documentation/UIKit/UIKeyboardLayoutGuide/followsUndockedKeyboard)

A Boolean value that determines if the layout guide tracks the keyboard when it’s undocked from the bottom of the screen.

### Adjusting dismissal sensitivity

[`keyboardDismissPadding`](/documentation/UIKit/UIKeyboardLayoutGuide/keyboardDismissPadding)

A value that adds padding above the keyboard to increase the size of the touch area for the scrolling dismissal gesture.

### Configuring safe area usage

[`usesBottomSafeArea`](/documentation/UIKit/UIKeyboardLayoutGuide/usesBottomSafeArea)

A Boolean value that indicates whether the layout guide uses the view’s safe area layout guide.



---

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)