Ankit Kapasi
Ankit Kapasi

Reputation: 23

Is there a way to disable predictive text off for the entire ios app like UIAppearance protocol?

The autocorrection / predictive text feature is generally not desired in the app. I'd like to make a user preference if they would like to disable it for the app but not require them to turn it off across the phone. Is there a way to do this? The documentation doesn't speak to this at all or maybe it does and I just got lost.

Upvotes: 0

Views: 1309

Answers (1)

carlos21
carlos21

Reputation: 485

  1. You can do it by assigning the property autocorrectionType to false in every textfield that you have.
  2. You can subclass UITextField class and use it in every view controller that you want.
  3. You can use Method Swizzling in order to auto set this property for UITextField class

Upvotes: 2

Related Questions