Implementing autocomplete in iPhone UITextField for contacts in the address book

I would like to have a UITextField or UITextView in the place where, as I do some input, the alternatives will be displayed in much the same way as when entering the address in Mail Application, the alternatives will appear and maybe touch them to get a better input user interface. (since there is no need to enter the full word or address or phone number)

I know how to extract data from the address book structure, as well as how to enter text in the UITextField / UITextView and its delegates, but I do not know what structure to use to extract and display the data, how the user makes his / her contribution.

I know the underlying CoreData, if that matters,

I hope I can help.

UPDATE (2010/3/10): I have no problem creating my own GUI, but I ask about this algorithm, does anyone know which algorithm is suitable for this purpose? maybe some kind of binary tree? Or do I just need to retrieve data from coredata every time?

thank

Ignacio

UPDATE (2010/03/28): I am very busy these days, so I have not tried UISearchResults, but it seems to me that this is good. BUT I wonder if there is a need to remove the answer to the victory? I do not think that honestly, my reputation has declined and could not see a winning answer .; (

+3
source share
2 answers

- , ... , , (, ). UISearchDisplayController. , , Apple TableSearch.

, (, , , )... (, , ...). , , . , , , , . - , ... , , , .

+7

. -, , Three20 (google it).

, , . :)

:

UIScrollView, . UITextField "editRectForBounds" . , , - UITableView :

[UIColor colorWithRed:0.92 green:0.92 blue:0.92 alpha:1];

:

[UIColor colorWithWhite:0.85 alpha:1];

, UITextField. UIView, , , .

, UIView, "touchhesBegan", , .

- , :

[myTextField addSubview:myBlueView];

, !

+1
source

Source: https://habr.com/ru/post/1735881/


All Articles