5

I am looking for a way where in UITextView autocorrection should not happen but prediction above keyboard should appear when user types. Is this possible?

Autocorrection can be disabled using below snippet which disables prediction also:

textfield.autocorrectionType = UITextAutocorrectionTypeNo;
7
  • Possible duplicate stackoverflow.com/questions/3802389/…
    – radioaktiv
    Feb 25, 2016 at 14:56
  • Please read the question carefully. I know how to disable autocorrection. I am looking for answer where autocorrection is disabled but prediction still appears.
    – Arun Gupta
    Feb 25, 2016 at 14:58
  • Why a vote down is given on the question. I didn't find any answer on this which let me here.
    – Arun Gupta
    Feb 25, 2016 at 15:41
  • Another possible duplicate stackoverflow.com/questions/25767522/…
    – radioaktiv
    Feb 25, 2016 at 21:12
  • 1
    Have you found the answer yet? The Facebook app could do this. I don't know why. :(
    – Danh Huynh
    Aug 15, 2019 at 2:44

1 Answer 1

2

Try with :

  textfield.spellCheckingType = UITextSpellCheckingTypeNo;
4
  • ansTextField.autocorrectionType = UITextAutocorrectionTypeYes; ansTextField.spellCheckingType = UITextSpellCheckingTypeNo; i have this two already set in my code. This gives prediction as well as autocorrect the word
    – Arun Gupta
    Feb 29, 2016 at 10:06
  • Since you dont want autocorrection why do you have ansTextField.autocorrectionType = UITextAutocorrectionTypeYes; ?
    – radioaktiv
    Feb 29, 2016 at 12:59
  • I have tried all 4 combination with autocorrection and spellchecking. If i set autocorrection to NO then autocorrection doesn't happens and prediction also is disabled and if i set it to Yes then prediction as well as autocorrection happens. Spellchecking has no effect.
    – Arun Gupta
    Feb 29, 2016 at 13:37
  • 1
    The question asked here is valid and still no answers for it! Surprising. I too need an answer for it.
    – Shobhit C
    Jul 10, 2018 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.