<!--
{
  "availability" : [
    "macOS: 10.10.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NotificationCenter",
  "identifier" : "/documentation/NotificationCenter/NCWidgetSearchViewDelegate/widgetSearch(_:resultSelected:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Notification Center"
    ],
    "preciseIdentifier" : "c:objc(pl)NCWidgetSearchViewDelegate(im)widgetSearch:resultSelected:"
  },
  "title" : "widgetSearch(_:resultSelected:)"
}
-->

# widgetSearch(_:resultSelected:)

Tells the delegate that a user chose the specified search result.

```
func widgetSearch(_ controller: NCWidgetSearchViewController, resultSelected object: Any)
```

## Parameters

`controller`

The widget’s search view controller.

`object`

The object in the search view controller’s [`searchResults`](/documentation/NotificationCenter/NCWidgetSearchViewController/searchResults) array that represents the search result chosen by the user.

## Discussion

When this method returns, the search view controller is dismissed.

---

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)