What view do I return for NSTextFinderClient's contentViewAtIndex:effectiveCharacterRange protocol method?

168 views Asked by At

I've implemented an object that conforms to the NSTextFinderClient protocol. The textFinder's find bar container is a WebView's WebDynamicScrollBarsView, which is an NSScrollView. When I show the Find Bar in my WebView it calls the NSTextFinderClient's implementation of string:, where I return the webView's document.body.innerText. When I type into the Find Bar matches are found and appear to be enumerated while the TextFinder calls scrollRangeToVisible and contentViewAtIndex:effectiveCharacterRange on my NSTextFinderClient object, but nothing is highlighted.

Given this context, what should I return from my webview/scrollview for those two protocol methods in order for the textFinder to correctly highlight and scroll my webView?

Please note, this is a Mac application, I tagged uiwebview because there is no tag for the mac's WebView object and the webview tag is related to Android.

0

There are 0 answers