---
title: "contentView(at:effectiveCharacterRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextfinderclient/contentview(at:effectivecharacterrange:)"
---

# contentView(at:effectiveCharacterRange:)

Returns the view the context is displayed in.

## Declaration

```swift
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

Return Value Returns the view the contains the found text.

## See Also

### Determining and Displaying Text Locations

- [rects(forCharacterRange:)](appkit/nstextfinderclient/rects(forcharacterrange:).md)
- [scrollRangeToVisible(_:)](appkit/nstextfinderclient/scrollrangetovisible(_:).md)
- [visibleCharacterRanges](appkit/nstextfinderclient/visiblecharacterranges.md)
