iOS 11 disable password autofill accessory view option?

后端 未结 20 2532
孤独总比滥情好
孤独总比滥情好 2020-11-28 04:20

As of now I would like to opt out of the new option iOS 11 gives, that is to suggest passwords in the app. When I run the app on iOS 11 I get the autofill option on top of t

20条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 04:44

    I have attached the screenshot. you can change the content Type as Username in the storyboard or you can do programatically. you may create an extension for UITextfield .

    func diableAutofill() {
            self.autocorrectionType = .no
            if #available(iOS 11.0, *) {
                self.textContentType = .username
            } else {
                self.textContentType = .init("")
            }
        }
    

提交回复
热议问题