<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextFinderClient/contentView(at:effectiveCharacterRange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextFinderClient(im)contentViewAtIndex:effectiveCharacterRange:"
  },
  "title" : "contentView(at:effectiveCharacterRange:)"
}
-->

# contentView(at:effectiveCharacterRange:)

Returns the view the context is displayed in.

```
optional func contentView(at index: Int, effectiveCharacterRange outRange: NSRangePointer) -> NSView
```

## Parameters

`index`

The index of the view containing the located text.

`outRange`

Returns, by reference, the entire range of the string displayed by the view

## Return Value

Returns the view the contains the found text.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)