<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFindInteractionDelegate/findInteraction(_:sessionFor:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIFindInteractionDelegate(im)findInteraction:sessionForView:"
  },
  "title" : "findInteraction(_:sessionFor:)"
}
-->

# findInteraction(_:sessionFor:)

Provides the object for managing the state, presentation, and behavior of the search.

```
func findInteraction(_ interaction: UIFindInteraction, sessionFor view: UIView) -> UIFindSession?
```

## Parameters

`interaction`

The interaction object triggering the find panel.

`view`

The view you provide a find session object for.

## Return Value

Returns an object the find interaction uses to manage the state, presentation, and behavior of the search. To prevent the find panel from appearing, return `nil`.

## Discussion

Implement the [`UITextSearching`](/documentation/UIKit/UITextSearching-53wjq) protocol on the class that encapsulates the searchable content for your view to use an instance of [`UITextSearchingFindSession`](/documentation/UIKit/UITextSearchingFindSession) as the session object. Alternatively, you can subclass [`UIFindSession`](/documentation/UIKit/UIFindSession) to manage the details of the session using a custom class.

---

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)