Initializer

init(_:text:prompt:)

Creates a secure field with a prompt generated from a Text.

Declaration 宣言

init<S>(_ title: S, text: Binding<String>, prompt: Text?) where S : StringProtocol
Available when Label is Text. LabelTextである時に利用可能です。

Parameters パラメータ

title

The title of self, describing its purpose.

text

The text to display and edit.

prompt

A Text representing the prompt of the secure field which provides users with guidance on what to type into the secure field.

Discussion 議論

Use the onSubmit(of:_:) modifier to invoke an action whenever the user submits this secure field.

See Also 参照

Creating a Secure Text Field