UATextInputNotificationAction

@interface UATextInputNotificationAction : UANotificationAction

Clone of UNTextInputNotificationAction for iOS 8-10 support.

Note that in iOS 8, UATextInputNotificationAction actions will not be registered as custom actions with the operating system, as text input notification actions are not supported in iOS 8.

  • The localized string to use as the title of the text input button.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull textInputButtonTitle;

    Swift

    var textInputButtonTitle: String { get }
  • The localized string to display in the text input field.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull textInputPlaceholder;

    Swift

    var textInputPlaceholder: String { get }
  • Init method.

    Declaration

    Objective-C

    - (nonnull instancetype)
          initWithIdentifier:(nonnull NSString *)identifier
                       title:(nonnull NSString *)title
        textInputButtonTitle:(nonnull NSString *)textInputButtonTitle
        textInputPlaceholder:(nonnull NSString *)textInputPlaceholder
                     options:(UANotificationActionOptions)options;

    Swift

    init(identifier: String, title: String, textInputButtonTitle: String, textInputPlaceholder: String, options: UANotificationActionOptions = [])

    Parameters

    identifier

    The action’s identifier.

    title

    The action’s title.

    textInputButtonTitle

    The title of the text input button.

    textInputPlaceholder

    The text to display in the text input field.

    options

    The action’s options.

  • Creates an action with the specified title and options.

    Declaration

    Objective-C

    + (nonnull instancetype)
        actionWithIdentifier:(nonnull NSString *)identifier
                       title:(nonnull NSString *)title
        textInputButtonTitle:(nonnull NSString *)textInputButtonTitle
        textInputPlaceholder:(nonnull NSString *)textInputPlaceholder
                     options:(UANotificationActionOptions)options;

    Parameters

    identifier

    The unique string that you use internally to identify the action. When the user selects the action, the system passes this string to your app and asks you to perform the related task. This parameter must not be nil.

    title

    The localized string to display to the user. This string is displayed in interface elements such as buttons that are used to represent actions. This parameter must not be nil.

    textInputButtonTitle

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

    textInputPlaceholder

    The localized placeholder text to display in the text input field.

    options

    Additional options for how the action should be performed. Add options sparingly and only when you require the related behavior. For a list of possible values, see UANotificationActionOptions.