---
title: "presentTextInputController(withSuggestions:allowedInputMode:completion:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacecontroller/presenttextinputcontroller(withsuggestions:allowedinputmode:completion:)"
---

# presentTextInputController(withSuggestions:allowedInputMode:completion:)

Displays a modal interface for gathering text input from the user.

## Declaration

```swift
func presentTextInputController(withSuggestions suggestions: [String]?, allowedInputMode inputMode: WKTextInputMode, completion: @escaping ([Any]?) -> Void)
```

```swift
func presentTextInputController(withSuggestions suggestions: [String]?, allowedInputMode inputMode: WKTextInputMode) async -> [Any]?
```

## Parameters

- `suggestions`: An array of doc://com.apple.documentation/documentation/Foundation/NSString objects, each of which contains a suggested phrase for input. The user can either select one of the phrases you suggest or input a new text phrase.
- `inputMode`: The type of input to allow. For a list of possible values, see doc://com.apple.watchkit/documentation/WatchKit/WKTextInputMode.
- `completion`: The block to execute after the user dismisses the modal interface. This block has no return value and takes the following parameter:

## Mentioned in

Navigating Between Scenes

## Discussion

Discussion This method executes asynchronously, returning shortly after you call it. During a subsequent run loop cycle, the system displays a text input controller to the user. The input controller displays the list of input phrases you specify and provides options to enter new text phrases through dictation or to select from a list of emoji. When the user accepts a value or cancels input, the text input controller dismisses itself and then executes the block in the completion parameter on the WatchKit extension’s main thread. Use the block to retrieve the accepted value and apply it to your content. The presenting interface controller is activated before the block is executed. Always call this method from your WatchKit extension’s main thread.

## See Also

### Handling text input

- [presentTextInputControllerWithSuggestions(forLanguage:allowedInputMode:completion:)](watchkit/wkinterfacecontroller/presenttextinputcontrollerwithsuggestions(forlanguage:allowedinputmode:completion:).md)
- [dismissTextInputController()](watchkit/wkinterfacecontroller/dismisstextinputcontroller().md)
- [WKTextInputMode](watchkit/wktextinputmode.md)
