<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextFinder/incrementalMatchRanges",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextFinder(py)incrementalMatchRanges"
  },
  "title" : "incrementalMatchRanges"
}
-->

# incrementalMatchRanges

Array of incremental search matches posted on the main queue, which have been found during a background search.

```
var incrementalMatchRanges: [NSValue] { get }
```

## Discussion

This array is updated periodically on the main queue as the incremental search operation on a background queue finds matches. You can use this property when incrementalSearchingShouldDimContentView is <doc://com.apple.documentation/documentation/Swift/false> to know where to draw highlights for incremental matches.

If no incremental search is active, or there are no matches found, this array will be empty. If an incremental search is currently in progress, but not yet complete, this will return all the ranges found so far.

This array is key-value observing compliant and can be observed to know when to update your highlights. When <doc://com.apple.documentation/documentation/Foundation/NSKeyValueObservingOptions/new> and <doc://com.apple.documentation/documentation/Foundation/NSKeyValueObservingOptions/old> options are used, the key-value observing change dictionary provides the ranges (and their indexes) that are added or removed. This allows the invalidation of the minimal region necessary to sync highlights with the receiver’s results.

---

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)