Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing suggestions in a text view in iPhone

Tags:

xcode

iphone

I have a textview. When we are editing a textview, we can see suggestions as shown in the image. I want to customize the suggestions. ie, Instead of the default words in suggestion box, I want to show words from my array. How can i do this?

Thanks in advance...

like image 796
Deepzz Avatar asked Oct 17 '12 10:10

Deepzz


People also ask

How do I change the suggested text on my iPhone?

Tap Keyboard Settings, then turn on Predictive. Or go to Settings > General > Keyboard, and turn Predictive on or off. See a full list of languages that support predictive text.

How do I change my predictive text suggestions?

You can clear the predictive text suggestions by resetting the keyboard. To reset the keyboard, open System Settings on the HOME Menu, then select System ⇒ Formatting Options ⇒ Reset Keyboard. Select the user you'd like to reset the keyboard for, then follow the on-screen instructions.

Can you edit your word suggestions on iPhone?

There is no way to edit predictive text on an iPhone directly. If you want to remove one word from the predictive text dictionary, the only way is to reset the dictionary.


1 Answers

To disable suggestion there are 2 methods:

First one is:

UITextField* f = [[UITextField alloc] init];
f.autocorrectionType = UITextAutocorrectionTypeNo;

Second one is: The Interface Builder also has a dropdown field to disable this. As you're more likely to create textfields in the interface builder, look for it there. You can find it in the Attributes Inspector next to 'Correction'.

For your array in suggestions go through this link:https://www.cocoacontrols.com/controls/autocompletiontableview

like image 76
Pradeep Mittal Avatar answered Oct 05 '22 05:10

Pradeep Mittal