Yellow NSTextView shortcut as in safari search

I have done this before, but I just canโ€™t remember how I did it = (

So, I am trying to select a range in NSTextView and make it visible with a yellow box similar to Safari search. As far as I remember, there is an API assembly for this, but after searching, like crazy, I did not find it. And I already asked about it on this site, but apparently I canโ€™t find the old post ...

The selectRange method only makes a range selection; it does not select at all.

Am I really mistaken in this sense that there is no longer an API for this? If so, what is the best approach. To add CALayer to a text box and do it all yourself?

+5
source share
1 answer

All Articles