SecureField for Passwords
Hide sensitive input with SecureField.
Hiding Sensitive Text
Passwords should never appear on screen as plain letters. SwiftUI gives you SecureField, a text field that masks every character. 🔒
Just Like TextField
A SecureField works exactly like a TextField: a placeholder and a binding. The only difference is the dots shown instead of the real characters.
SecureField("Password", text: $password)All lessons in this course
- Binding a TextField to State
- Keyboard Types & Placeholders
- SecureField for Passwords
- Live Input Validation