AP.*_*AP. 10 autocomplete nstextview code-completion
我正在寻找一种方法(或代码)来获得接近xcode的完成列表

你知道如何实现这个目标吗?
感谢致敬,
使用
- (NSArray *)textView:(NSTextView *)textView completions:(NSArray *)words forPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger *)index
Run Code Online (Sandbox Code Playgroud)
NSTextViewDelegate的方法.无论何时启动文本完成(由用户,按Esc或F5,或以编程方式,通过调用)都会调用此方法-[NSTextView complete:].
但是,您需要做一些花哨的重写,使其看起来像Xcode中的那个.库存实现仅显示系统字体中的纯文本.
| 归档时间: |
|
| 查看次数: |
3024 次 |
| 最近记录: |