问题
Instead of implementing my own, I am looking into reusing an existing custom NSTextField that has support for suggestions drop-down - Same as the one in the browser as you type you get a list of suggestions underneath.
Do you know any good ones?
Thank you!
回答1:
They're called completions. You still use a regular text field but add this:
control:textView:completions:forPartialWordRange:indexOfSelectedItem
The biggest problem is you need to provide the list of words that can be autocompleted.
来源:https://stackoverflow.com/questions/6725359/nstextfield-with-suggestions-drop-down