---
title: NCWidgetSearchViewController
framework: Notification Center
role: symbol
role_heading: Class
platforms: [macOS 10.10+]
path: notificationcenter/ncwidgetsearchviewcontroller
---

# NCWidgetSearchViewController

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

## Declaration

```swift
class NCWidgetSearchViewController
```

## Overview

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. When a widget is in editing mode, it can enable search for new content by instantiating an NCWidgetSearchViewController object and presenting it using present(inWidget:). The search view controller displays the default search field and a list of results. It uses its delegate to perform the search itself.

## Topics

### Enabling Search

- [delegate](notificationcenter/ncwidgetsearchviewcontroller/delegate.md)
- [NCWidgetSearchViewDelegate](notificationcenter/ncwidgetsearchviewdelegate.md)

### Displaying the Search Interface

- [searchDescription](notificationcenter/ncwidgetsearchviewcontroller/searchdescription.md)
- [searchResultsPlaceholderString](notificationcenter/ncwidgetsearchviewcontroller/searchresultsplaceholderstring.md)

### Displaying Search Results

- [searchResultKeyPath](notificationcenter/ncwidgetsearchviewcontroller/searchresultkeypath.md)
- [searchResults](notificationcenter/ncwidgetsearchviewcontroller/searchresults.md)

## Relationships

### Inherits From

- [NSViewController](appkit/nsviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSEditor](appkit/nseditor.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSeguePerforming](appkit/nssegueperforming.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Search View

- [NCWidgetSearchViewDelegate](notificationcenter/ncwidgetsearchviewdelegate.md)
