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

# contentView()

A view hierarchy that contains all the views which display the contents being searched.

```
optional func contentView() -> NSView?
```

## Return Value

The root view of the content view hierarchy.

## Discussion

This content view defines the view hierarchy to be dimmed during incremental search, if the `NSTextFinder` instance’s [`incrementalSearchingShouldDimContentView`](/documentation/AppKit/NSTextFinder/incrementalSearchingShouldDimContentView) is <doc://com.apple.documentation/documentation/Swift/true>. If this method is not implemented or returns `nil`, then the `NSTextFinder` instance will act as if [`incrementalSearchingShouldDimContentView`](/documentation/AppKit/NSTextFinder/incrementalSearchingShouldDimContentView) is <doc://com.apple.documentation/documentation/Swift/false>

---

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)