【问题标题】:Not able to manually type a password when AutoFill functionality is enabled with two textfields使用两个文本字段启用自动填充功能时无法手动键入密码
【发布时间】:2023-02-01 02:54:05
【问题描述】:

我有两个文本字段,即密码和确认密码。问题是,如果我从设置应用程序启用了自动填充密码功能,我可以通过键盘在密码字段中手动输入密码,但如果我随后转到确认密码字段,它会自动填写强自动填充密码。因此,我无法在两个字段中手动输入密码。

我正在使用 RxSwift,但希望这不会对此产生任何影响。我所做的只是:

passwordTextField.isSecureEntry = true
passwordTextField.textContentType = .newPassword

confirmPasswordTextField.isSecureEntry = true
confirmPasswordTextField.textContentType = .newPassword

甚至尝试将其中一个字段的 textContentType 设置为 .password,将另一个设置为 .newPassword,但它不起作用。我确实想要自动填充和手动输入功能。我可以在一个字段中手动填写密码,但是当我点击另一个字段时,两个字段都会自动更改为强密码。

【问题讨论】:

  • 您将哪个字段设置为 .password?确认密码字段还是密码字段?
  • 密码字段为 .password 并确认密码字段为 .newPassword

标签: ios swift iphone xcode uikit


【解决方案1】:

有没有人找到解决方案?我们有同样的问题。

我们有以下内容:

passwordTextField.isSecureEntry = true
passwordTextField.textContentType = .password

confirmPasswordTextField.isSecureEntry = true
confirmPasswordTextField.textContentType = .newPassword

我们也尝试过:

passwordTextField.isSecureEntry = true
passwordTextField.textContentType = .newPassword

confirmPasswordTextField.isSecureEntry = true
confirmPasswordTextField.textContentType = .newPassword

passwordTextField.isSecureEntry = true
passwordTextField.textContentType = .newPassword

confirmPasswordTextField.isSecureEntry = true
confirmPasswordTextField.textContentType = .password

所有人都表现出与原始海报相同的行为。这曾经有效,但在 2022 年秋季的某个时候停止在我们的应用程序上工作。

【讨论】:

    猜你喜欢
    • 2016-07-20
    • 2019-04-01
    • 2022-01-01
    • 2021-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多