相关疑难解决方法(0)

将PasswordField设置为secureTextEntry给我一个奇怪的行为

我有一个passwordField,我将其设置isSecureTextEntry为true,用于隐藏字符.但是,当我点击这个时,passwordField这告诉我这个错误:

[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: "myapp" due to error: iCloud Keychain is disabled
Run Code Online (Sandbox Code Playgroud)

键盘自动传递到一个qwerty的azerty ...

如果我删除passwordField.isSecureTextEntry = true问题消失但角色没有隐藏...

我告诉你我的代码:

passwordField.borderStyle = UITextField.BorderStyle.none
passwordField.font = UIFont(name: "Avenir-Heavy", size: 13)
passwordField.autocorrectionType = UITextAutocorrectionType.no
passwordField.clearButtonMode = UITextField.ViewMode.whileEditing
passwordField.keyboardType = UIKeyboardType.default
passwordField.returnKeyType = UIReturnKeyType.done
passwordField.contentVerticalAlignment = UIControl.ContentVerticalAlignment.bottom
passwordField.isSecureTextEntry = true
Run Code Online (Sandbox Code Playgroud)

我测试了这个答案,但没有任何变化

如何在没有iCloud Keychain和没有更改键盘的情况下隐藏我的textField的字符到qwerty?

我看了所有其他主题,但没有比我的问题...

ios swift

14
推荐指数
2
解决办法
5285
查看次数

密码字段的键盘仅在 iOS 12 上从 azerty 切换到 qwerty(有时)

我在 中编写了一个iOS应用程序Swift 4,我是法国人,所以我使用法语/法语地区的手机工作。

使用 iOS 12 设备,我的登录页面上的密码字段工作正常(使用保存的密码自动登录甚至可以工作,我没有做任何事情来使其正常工作),但在我的注册页面上,该字段使我的键盘从 AZERTY 切换到 QWERTY。

我的手机设置中只有 AZERTY 键盘,而且所有 iOS 12 设备都会发生这种情况,而不仅仅是我的...

我在代码中做的唯一一件事:(我的UIView文件名为 RegisterView.swift)

fieldPwd = UITextField()
fieldPwdConfirm = UITextField()
fieldPwd.isSecureTextEntry = true
fieldPwdConfirm.isSecureTextEntry = true
Run Code Online (Sandbox Code Playgroud)

这个问题有什么解决办法吗?谢谢 !

keyboard textfield ios swift

5
推荐指数
1
解决办法
3244
查看次数

如何启用/禁用特定文本字段的 OneTimeCode 功能?

对于 OTP 文本字段,我已将 textContentType 设置为 oneTimeCode

if #available(iOS 12.0, *) {
     otpTextField.textContentType = .oneTimeCode
}    
Run Code Online (Sandbox Code Playgroud)

现在,当我们收到 OTP 时,iOS 会为所有键盘类型设置为数字键盘的文本字段显示 OTP,例如)安全令牌、邮政编码等。

应用程序应该只为 textContentType 为 oneTimeCode 的文本字段填充 OTP,而不是应用程序中的所有文本字段。

如何为特定文本字段启用/禁用 oneTimeCode?

ios swift

5
推荐指数
2
解决办法
1982
查看次数

标签 统计

ios ×3

swift ×3

keyboard ×1

textfield ×1