See the NSTextControlTextEditingDelegate autocomplete methods. Here is an example for an NSTextView that can be easily adapted. Key Method:
- (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index
source
share