【问题标题】:Unable to disable autofill on keyboard on iOS 15 swift. Xcode 13无法在 iOS 15 swift 上禁用键盘上的自动填充。 Xcode 13
【发布时间】:2021-12-28 11:30:20
【问题描述】:

我需要禁用键盘自动填充。我使用了以下代码:

firstName.autocorrectionType = .no
lastName.autocorrectionType = .no
        
firstName.textContentType = .none
lastName.textContentType = .none 

在 iOS 14 和更早版本上不显示自动填充。 iOS 13.7 image.png.

在 iOS 15 上显示自动填充 iOS 15 image.png.

是否在 iOS 15 上为自动填充添加了新行为以及如何禁用它?

【问题讨论】:

标签: ios swift iphone xcode macos


【解决方案1】:

这是可以帮助您的解决方案? 也可以使用 autocorrectionType 禁用文本字段 spellCheckingType

firstName.autocorrectionType = .no
firstName.spellCheckingType = .no

lastName.autocorrectionType = .no
lastName.spellCheckingType = .no

【讨论】:

    猜你喜欢
    • 2023-03-03
    • 2019-04-05
    • 2021-12-05
    • 2021-11-18
    • 2018-02-03
    • 2019-11-26
    • 2020-02-09
    • 2021-11-18
    相关资源
    最近更新 更多