Search-like highlighting in NSTextView

五迷三道 提交于 2019-12-01 04:03:37

问题


So, this is what I want :

  • When a match is highlighted under Mac OS X (when using the "Find" Action), a specific golden rounded box is drawn around the match for an instant (animated) and then goes away.

  • Is there any way I can programmatically trigger the very same function, and highlight a specific range in an NSTextView?

I'm sure there must be something like that out-of-the-box, but I definitely cannot find it...


回答1:


I thought it was this one:

- (void)showFindIndicatorForRange:(NSRange)charRange

For NSTextView (docs here).



来源:https://stackoverflow.com/questions/10670240/search-like-highlighting-in-nstextview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!