gpt4 book ai didi

ios - UITextField secureTextEntry 是否关闭 autocorrectionType 和 autocapatilizationType?

转载 作者:行者123 更新时间:2023-11-29 12:53:01 33 4
gpt4 key购买 nike

当我使用

保护 UITextField 时
textField.secureTextEntry = YES;

以下特征会受到任何影响吗?

  • autocapitalizationType
  • 自动更正类型
  • 拼写检查类型

最佳答案

答案是肯定的。它们都以用户键入的方式进行调整,即显示在文本字段中的内容,而无需对文本进行任何更改。

这是UITextInputTraits Protocol Reference说:

@property(nonatomic, getter=isSecureTextEntry) BOOL secureTextEntry

Identifies whether the text object should hide the text being entered.

This property is set to NO by default. Setting this property to YES creates a password-style text object, which hides the text being entered.

如果输入的文本被隐藏,并且打开了任何类型的更正/大写,用户将看不到被替换/更改的内容。因此,自动资本化,不会进行自动更正和拼写检查。

关于ios - UITextField secureTextEntry 是否关闭 autocorrectionType 和 autocapatilizationType?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21973119/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com