NSTextField autocompletion delegate method not called
问题 I implemented the following delegate method for NSTextField to add autocompletion support: - (NSArray *)control:(NSControl *)control textView:(NSTextView *)textView completions:(NSArray *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index The issue is that this method never gets called. I can verify that the delegate of the NSTextField is set properly because the other delegate methods function as they should. 回答1: You'll need to get complete: called on the