---
title: widgetController()
framework: notificationcenter
role: symbol
role_heading: Type Method
path: notificationcenter/ncwidgetcontroller/widgetcontroller()
---

# widgetController()

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

## Declaration

```swift
class func widgetController() -> Self
```

## Return Value

Return Value A widget controller.

## Discussion

Discussion Both a widget and its containing app can get a widget controller object to specify whether there is content the widget should display.
