Instance Method


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


optional func widgetMarginInsets(forProposedMarginInsets defaultMarginInsets: UIEdgeInsets) -> UIEdgeInsets
optional func widgetMarginInsets(forProposedMarginInsets defaultMarginInset: NSEdgeInsets) -> NSEdgeInsets



The default margin insets that are available to the widget.

Return Value

A value of type UIEdgeInsets that contains the custom margin insets a widget is using instead of the default values.


A widget can implement this method to return custom margin inset values to use instead of the default values specified in defaultMarginInsets. (If the widget doesn’t need to use custom values, it should return the unchanged default values in its implementation.) If a widget doesn’t implement this method, it automatically receives the default margin inset values.

See Also

Customizing the Display

enum NCWidgetDisplayMode

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