0PricingLogin
SwiftUI Academy · Lesson

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

  1. Binding a TextField to State
  2. Keyboard Types & Placeholders
  3. SecureField for Passwords
  4. Live Input Validation
← Back to SwiftUI Academy