<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextSearching-53wjq/decorateFoundTextRange:inDocument:usingStyle:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextSearching(im)decorateFoundTextRange:inDocument:usingStyle:"
  },
  "title" : "decorateFoundTextRange:inDocument:usingStyle:"
}
-->

# decorateFoundTextRange:inDocument:usingStyle:

Applies the style to a specific text range to indicate found and highlighted results.

```
- (void) decorateFoundTextRange:(UITextRange *) range inDocument:(UITextSearchDocumentIdentifier) document usingStyle:(UITextSearchFoundTextStyle) style;
```

## Parameters

`range`

The text range to decorate.

`document`

A string that uniquely identifies the document containing the text range. `Nil` when searching a single document.

`style`

The style to decorate the text: highlighted, found, or normal.

## Discussion

The system calls this method during a find session to display the results of a search in your custom view. Your implenentation should decorate matching text ranges for the given style to indicate the found and highlighted result.

---

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)