---
title: NCWidgetSearchViewDelegate
framework: Notification Center
role: symbol
role_heading: Protocol
platforms: [macOS 10.10+]
path: notificationcenter/ncwidgetsearchviewdelegate
---

# NCWidgetSearchViewDelegate

The interface for enabling user searches in the search view controller of a macOS Today widget.

## Declaration

```swift
protocol NCWidgetSearchViewDelegate : NSObjectProtocol
```

## Overview

Overview The NCWidgetSearchViewDelegate protocol defines methods that enable user searches in the search view controller of a Today widget. The delegate of an NCWidgetSearchViewController must adopt the NCWidgetSearchViewDelegate protocol. The search view controller tells its delegate to perform a search on a user’s input and the delegate returns the results by setting the controller’s searchResults property. The search view controller also tells its delegate when a user clears the search field or chooses a search result, so that the delegate can prepare for a new search or dismissal.

## Topics

### Searching Your Content

- [widgetSearch(_:searchForTerm:maxResults:)](notificationcenter/ncwidgetsearchviewdelegate/widgetsearch(_:searchforterm:maxresults:).md)

### Responding to User Choices

- [widgetSearch(_:resultSelected:)](notificationcenter/ncwidgetsearchviewdelegate/widgetsearch(_:resultselected:).md)
- [widgetSearchTermCleared(_:)](notificationcenter/ncwidgetsearchviewdelegate/widgetsearchtermcleared(_:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Search View

- [NCWidgetSearchViewController](notificationcenter/ncwidgetsearchviewcontroller.md)
