Contents

init(_:text:onCommit:)

Creates an instance.

Declaration

nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onCommit: @escaping () -> Void)

Parameters

  • titleKey:

    The key for the localized title of self, describing its purpose.

  • text:

    The text to display and edit.

  • onCommit:

    The action to perform when the user performs an action (usually pressing the Return key) while the secure field has focus.