<!--
{
  "availability" : [
    "tvOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TVUIKit",
  "identifier" : "/documentation/TVUIKit/TVDigitEntryViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "TVUIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)TVDigitEntryViewController"
  },
  "title" : "TVDigitEntryViewController"
}
-->

# TVDigitEntryViewController

A view controller that enables the user to enter digits, like a passcode, in your app.

```
class TVDigitEntryViewController
```

## Overview

Use the `TVDigitEntryViewController` class to manage a digit entry view. The digit entry view is automatically presented by the view controller and consists of boxes that display digits and a digit keyboard.

![A fullscreen image with five grey boxes in the middle of the screen and a row of numbers from 1 to 0 below the boxes.](images/com.apple.tvuikit/media-3016866@2x.png)

## Topics

### Configuring the Digit Entry View

[`numberOfDigits`](/documentation/TVUIKit/TVDigitEntryViewController/numberOfDigits)

The number of required digits.

[`titleText`](/documentation/TVUIKit/TVDigitEntryViewController/titleText)

The title of the digit entry view.

[`promptText`](/documentation/TVUIKit/TVDigitEntryViewController/promptText)

A prompt that displays any additional required information.

[`secureDigitEntry`](/documentation/TVUIKit/TVDigitEntryViewController/isSecureDigitEntry)

A Boolean value that indicates whether an entered digit is immediately obscured.

### Entering Information

[`entryCompletionHandler`](/documentation/TVUIKit/TVDigitEntryViewController/entryCompletionHandler)

A completion handler that cues the app that the user has entered the required number of digits for the digit entry view.

[`-  clearEntryAnimated:`](/documentation/TVUIKit/TVDigitEntryViewController/clearEntry(animated:))

Removes all digits from the digit entry view.

## Relationships

### Conforms To

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

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

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

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

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

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

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

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

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

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

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

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

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)