WidgetRenderingMode
Constants that indicate the rendering mode for a widget.
Declaration
struct WidgetRenderingModeMentioned in
Overview
The system can modify the appearance of accessory family widgets. For example, it renders widgets on the Lock Screen on iPhone using the vibrant mode, while it renders widget-based complications in watchOS using either the fullColor or accented modes, depending on the watch face and the user’s settings.
You can read the rendering mode from the environment values using the .widgetRenderingMode key.
@Environment(\.widgetRenderingMode) var widgetRenderingModeYou can then customize your widget’s design based on the rendering mode.