Frankie Frankie - 20 days ago 6
iOS Question

What does 'default' really mean for UITextInputTrait constants

I'm trying to explain to someone there's 3 options for

UITextAutocorrectionType
, yes, no, and default. They asked me what
default
meant. I have no idea. The documentation is not very helpful. Does anyone have further insight?


case
default


Specifies an appropriate autocorrection behavior for the current script system.


Just as elusive are defaults for
UITextSpellCheckingType
and
UIKeyboardType


Are these defaults set by the user on their own phone/system?

Answer

default says to use whatever value is set in the iOS Settings app under General -> Keyboard. If the "Auto-correction" setting is enabled and the UITextAutocorrectionType is set to default then the auto correct will be used. If the "Auto-correction" setting is disabled then the auto correct won't be used.

no explicitly says not to do any autocorrection regardless of the "Auto-correction" setting.

yes explicitly says to do autocorrect regardless of the "Auto-correction" setting.