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

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift