Instance Method

widgetActiveDisplayModeDidChange:withMaximumSize:

Called when the active display mode changes.

Declaration

- (void)widgetActiveDisplayModeDidChange:(NCWidgetDisplayMode)activeDisplayMode withMaximumSize:(CGSize)maxSize;

Parameters

activeDisplayMode

The new active display mode. See NCWidgetDisplayMode for possible values.

maxSize

A CGSize object that represents the new maximum size this widget can have.

Discussion

You might implement this method if your widget should change its preferredContentSize value to better accommodate the new display mode.

Widgets displayed as NCWidgetDisplayModeCompact have a fixed size passed in the maxSize parameter.

See Also

Customizing the Display

- widgetMarginInsetsForProposedMarginInsets:

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

NCWidgetDisplayMode

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