I am looking for a way (or code) to have a completion list close to the one of xcode
Do you know how to achieve this?
Thanks and regards,
Use the
- (NSArray *)textView:(NSTextView *)textView completions:(NSArray *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index
method of NSTextViewDelegate. This is called whenever text completion is initiated (either by the user, by pressing Esc or F5, or programmatically, by calling -[NSTextView complete:]
.
You'll need to do some fancy overriding to make it look like the one in Xcode, however. The stock implementation displays only plain text in the system font.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With