Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search-like highlighting in NSTextView

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...

like image 806
Dr.Kameleon Avatar asked May 20 '12 02:05

Dr.Kameleon


1 Answers

I thought it was this one:

- (void)showFindIndicatorForRange:(NSRange)charRange

For NSTextView (docs here).

like image 130
Vervious Avatar answered Nov 01 '22 21:11

Vervious