views:

148

answers:

1

I've done this before but I simply can't remember how I did it =(

So what I'm trying to do is to select a range in a NSTextView and make it visible with the yellow box similar to Safari search. As far as I remember there is a build in API for this but after searching like crazy I haven't found it. And I've asked about it once before on this site but apparently I can't find the old post...

The selectRange method does only select the range, it doesn't emphasize the selection at all.

Am I wrong about this meaning that there isn't an API for this already? If so what is the best approach. To add a CALayer to the textview and do it all by myself?

+4  A: 

Have you tried showFindIndicatorForRange:?

Alex
Thank you so much.. I don't know why I had so much trouble finding it =/ I've been looking through the whole damn thing and it was driving me crazy =)
Jakob Dam Jensen