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

# NCWidgetController

An object used to specify whether a Today widget has content to display.

```
class NCWidgetController
```

## Overview

The `NCWidgetController` class defines an object that both a Today widget and the containing app that delivers the widget can use to specify whether the widget has content to display. Because this class helps a widget and its containing app coordinate the display of the widget’s content, a widget that doesn’t communicate with its containing app is unlikely to use this class.

Typically, a widget appears in the Today view when it has content to display. If a currently running widget no longer has content to display, it can get a widget controller and set the flag in the [`setHasContent(_:forWidgetWithBundleIdentifier:)`](/documentation/NotificationCenter/NCWidgetController/setHasContent(_:forWidgetWithBundleIdentifier:)) method to `false`. If the containing app later determines that there is content this widget should display, the app can get a widget controller and update the flag, even while the widget isn’t running.

The `NCWidgetController` class should not be subclassed.

## Topics

### Getting a Widget Controller

[`widgetController()`](/documentation/NotificationCenter/NCWidgetController/widgetController())

Returns a widget controller used to specify whether a widget has content to display.

### Specifying the Presence of Content

[`setHasContent(_:forWidgetWithBundleIdentifier:)`](/documentation/NotificationCenter/NCWidgetController/setHasContent(_:forWidgetWithBundleIdentifier:))

Sets whether the specified widget has content to display.

### Type Methods

[`default()`](/documentation/NotificationCenter/NCWidgetController/default())



---

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)