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

# UITextInputContext

An object that reports the type of input your app receives.

```
class UITextInputContext
```

## Overview

Use the shared [`UITextInputContext`](/documentation/UIKit/UITextInputContext) object to get information about the type of input your app receives. UIKit apps can receive text input from sources other than the software keyboard, including from dictation, Apple Pencil, and a connected keyboard. Use information about the likely input sources to adjust your UI to accommodate that input. For example, you might increase the size of text fields to accommodate handwriting input from Apple Pencil.

## Topics

### Getting the input context object

[`class func current() -> UITextInputContext!`](/documentation/UIKit/UITextInputContext/current())

Returns the shared text-input context object.

### Getting the expected input type

[`var isDictationInputExpected: Bool`](/documentation/UIKit/UITextInputContext/isDictationInputExpected)

Returns a Boolean value that indicates whether someone is likely to use dictation to input text to the app.

[`var isHardwareKeyboardInputExpected: Bool`](/documentation/UIKit/UITextInputContext/isHardwareKeyboardInputExpected)

Returns a Boolean value that indicates whether someone is likely to enter text using a hardware keyboard.

[`var isPencilInputExpected: Bool`](/documentation/UIKit/UITextInputContext/isPencilInputExpected)

Returns a Boolean value that indicates whether someone is likely to use Apple Pencil for input.

## Relationships

### Conforms To

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)