SwiftUI - TEXTFIELD

TEXTFIELD
TextField is used to add a normal input box, which is often used as a text input.

Example:


TextField(self.$name, placeholder: self.nameText, onEditingChanged: { changed in
    print("onEditing: \(changed)")
}) {
    print("userName: \(self.name)")
    self.endEditing(true)
}}
.padding(10)
.frame(height: 50)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding(EdgeInsets(top: 0, leading: 20, bottom: 0, trailing: 20))

Comments

Popular posts from this blog

SwiftUI - TEXT