Hello,
I have three textfields in a view of my application:
TextField("Email address", text: $email)
SecureField("Password", text: $password)
.textContentType(.password)
SecureField("Password confirmation", text: $passwordConfirmation)
.textContentType(.password)
When I tap on the password secure field, iOS show me the strong password view :
If I use this feature, everything is working fine, but if I tap on "Other options..." then "Choose my own password":
The textfields are cleared (that's great), but if I tap on the email textfield (or any other textfields), the password secure field is filled with the strong password that I've just said I don't want...
Here is a video :
And here is my code :
@State private var email: String = ""
@State private var password: String = ""
@State private var passwordConfirmation: String = ""
var body: some View {
ScrollView {
VStack(spacing: 16) {
TextField("Email address", text: $email)
SecureField("Password", text: $password)
.textContentType(.password)
SecureField("Password confirmation", text: $passwordConfirmation)
.textContentType(.password)
}
.padding(.vertical, 32)
.padding(.horizontal, 16)
}
}
Any idea ?
Thanks,
Alexandre