Protocol

NCWidgetProviding

The interface for customizing the appearance and behavior of a Today widget.

Declaration

@protocol NCWidgetProviding

Overview

The NCWidgetProviding protocol allows customization of the appearance and behavior of a Today widget.

Topics

Customizing the Display

- widgetMarginInsetsForProposedMarginInsets:

Called to let a widget accept the default margin inset values or return custom values to use instead.

- widgetActiveDisplayModeDidChange:withMaximumSize:

Called when the active display mode changes.

NCWidgetDisplayMode

The modes that can be toggled between when the user activates the More button for a widget running in iOS.

Updating a Widget’s Contents

- widgetPerformUpdateWithCompletionHandler:

Called to give a widget an opportunity to update its contents.

NCUpdateResult

The result of updating a widget's state.

Supporting Editing

widgetAllowsEditing

A Boolean value indicating whether the widget can be edited by users.

- widgetDidBeginEditing

Called when a user chooses the widget’s begin editing button.

- widgetDidEndEditing

Called when a widget’s editing session ends.

Relationships

See Also

Core Widget

Building a Simple Widget for the Today View

Provide users with a glanceable look at your app’s data.

NCWidgetController

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