<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFindSession/performSearch(query:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFindSession(im)performSearchWithQuery:options:"
  },
  "title" : "performSearch(query:options:)"
}
-->

# performSearch(query:options:)

Initiates a search for the query string you provide.

```
func performSearch(query: String, options: UITextSearchOptions?)
```

## Parameters

`query`

The string to search, the user provides through the search text field of the system find panel.

`options`

The object containing all the configurable options for the search.

## Discussion

The system calls this method when the user initiates a search for a string in your app’s text content.

---

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)