【发布时间】:2019-01-27 11:45:33
【问题描述】:
我添加了 3 个UITextFields 以通过输入电子邮件地址格式的用户名、新密码和密码确认来创建新帐户。正如Enabling Password AutoFill on a Text Input View 中所建议的那样。我已经像这样配置了用户名字段
userTextField.textContentType = .username
userTextField.keyboardType = .emailAddress
还有像这样的新密码字段
newPasswordTextField.textContentType = .newPassword
confirmPasswordTextField.textContentType = .newPassword
现在,当用户输入电子邮件地址作为用户名时,newPasswordTextField 会预先填充一个强密码的建议(如预期的那样),但confirmPasswordTextField 不会填充相同的建议密码。
当用户在newPasswordTextField 和confirmPasswordTextField 都预先填充相同的建议密码(也按照建议)之前直接点击newPasswordTextField 而不输入用户名。
如何结合这两种情况,在用户输入用户名后,两个密码字段都将预先填写相同的密码?
【问题讨论】:
-
我面临着完全相同的问题,并开始把头撞到墙上。你有想过吗?
-
这里有同样的问题。有没有人找到解决方法?