Class

UNTextInputNotificationAction

An action that can accept user-specified text.

Overview

A UNTextInputNotificationAction object represents an action that can accept text-based input from the user. When presented to the user, an action of this type is accompanied by controls for entering or dictating text content. The text provided by the user is then included in the response object that is delivered to your app.

You create instances of this class when defining the actions and categories used by your notifications. Always instantiate this class using the init(identifier:title:options:textInputButtonTitle:textInputPlaceholder:) method. Add the resulting objects to one of the UNNotificationCategory objects you define at launch time.

For more information about defining actions, see UNNotificationAction.

Topics

Creating a Text Input Action

Getting the Text Input Information

var textInputButtonTitle: String

The title of the text input button that is displayed to the user.

var textInputPlaceholder: String

The placeholder text to display in the text input field.

Relationships

See Also

Categories and Actions

class UNNotificationCategory

A definition of a type of notification that your app supports and the custom actions to display with it.

class UNNotificationAction

A task to perform in response to a delivered notification.

class UNTextInputNotificationResponse

The user’s response to an actionable notification, including any custom text that the user typed or dictated.