I want to know how to make something happen when i type a specific word in a textfield
how to make something happen when a word it typed in a textfield
Code Block TextField("enter text", text: $text) .onChange(of: text) { if $0 == "magic" { // use $0.lowercased() for case-insensitive // do something } }
Thanks. is the $0 a variable if not could use give a example of what it is I'm a beginner.
never mind about the $0 I figured it out.