SwiftUI textfield with secure entry and email type
Solution:
Here we can easily declare the textfield type with email address.Based on that it will show the keyboard type with email entry based inputfields.
For password it will be a hidden entry that will control fo your input secret.
TextField($mail,
placeholder: Text("Enter email ID"))
.textFieldStyle(.roundedBorder )
.textContentType(.emailAddress )
TextField($password,
placeholder: Text("Enter password"))
.textFieldStyle(.roundedBorder )
.textContentType(.password)
Comments
Post a Comment