iOS 11 disable password autofill accessory view option?

后端 未结 20 2480
孤独总比滥情好
孤独总比滥情好 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:30

    This worked for ios 12 and 10:

    if (@available(iOS 10, *)) {
        passwordTextField.textContentType = UITextContentTypeStreetAddressLine2;
    }
    
    if (@available(iOS 12, *)) {
        passwordTextField.textContentType = UITextContentTypeOneTimeCode;
    }
    

提交回复
热议问题