Unable to disable autofill on keyboard on iOS 15 swift. Xcode 13

Viewed 323

I need to disable keyboard autofill. I used the following code:

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

On iOS 14 and older autofill is not shown. iOS 13.7 image.png.

On iOS 15 autofill is shown iOS 15 image.png.

Has a new behavior been added for autofill on iOS 15 and how to disable it?

1 Answers

Here is the solution this may helps you disable textfield spellCheckingType also with autocorrectionType

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

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