Last updated 2 years ago
Was this helpful?
Sarun โฉ
You create a text field with a label and a binding to a value.
If the value is a string, the text field updates this value continuously as the user types or otherwise edits the text in the field.
For non-string types, it updates the value when the user commits their edits, such as by pressing the Return key.
struct TextField<Label> where Label : View
- create a text field that binds to a bound value, using a to convert to and from this type.
init<S, F>( _ title: S, value : Binding<F.FormatInput>, format : F, prompt : Text? = nil ) where S : StringProtocol, F : ParseableFormatStyle, F.FormatOutput == String
โฉ โฉ
View
ParseableFormatStyle