<!--
{
  "availability" : [
    "macOS: 10.10.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "NotificationCenter",
  "identifier" : "/documentation/NotificationCenter/NCWidgetSearchViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Notification Center"
    ],
    "preciseIdentifier" : "c:objc(cs)NCWidgetSearchViewController"
  },
  "title" : "NCWidgetSearchViewController"
}
-->

# NCWidgetSearchViewController

An object that provides a default search view within a macOS Today widget.

```
class NCWidgetSearchViewController
```

## Overview

The `NCWidgetSearchViewController` class provides a default search view within a Today widget. A search view controller works together with its delegate to perform searches on the user’s input and display results from which a user can choose. To learn about the search view controller delegate methods, see [`NCWidgetSearchViewDelegate`](/documentation/NotificationCenter/NCWidgetSearchViewDelegate).

When a widget is in editing mode, it can enable search for new content by instantiating an `NCWidgetSearchViewController` object and presenting it using <doc://com.apple.documentation/documentation/AppKit/NSViewController/present(inWidget:)>. The search view controller displays the default search field and a list of results. It uses its [`delegate`](/documentation/NotificationCenter/NCWidgetSearchViewController/delegate) to perform the search itself.

## Topics

### Enabling Search

[`delegate`](/documentation/NotificationCenter/NCWidgetSearchViewController/delegate)

The search view controller’s delegate or `nil` if the receiver doesn’t have a delegate.

[`NCWidgetSearchViewDelegate`](/documentation/NotificationCenter/NCWidgetSearchViewDelegate)

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

### Displaying the Search Interface

[`searchDescription`](/documentation/NotificationCenter/NCWidgetSearchViewController/searchDescription)

A localized description of the nature of the search.

[`searchResultsPlaceholderString`](/documentation/NotificationCenter/NCWidgetSearchViewController/searchResultsPlaceholderString)

A localized phrase displayed in the results list when no search results are available.

### Displaying Search Results

[`searchResultKeyPath`](/documentation/NotificationCenter/NCWidgetSearchViewController/searchResultKeyPath)

A key path for the string property to display for each object in the search results array.

[`searchResults`](/documentation/NotificationCenter/NCWidgetSearchViewController/searchResults)

An array of search results.



---

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)