Instance Method

preferredColorScheme(_:)

Sets the preferred color scheme for this view.

Declaration

func preferredColorScheme(_ colorScheme: ColorScheme?) -> some View

See Also

Adopting View Color Schemes

func colorScheme(ColorScheme) -> View

Sets the view’s color scheme.

enum ColorScheme

The possible types of color schemes, like Dark Mode.

struct PreferredColorSchemeKey

A key for specifying the preferred color scheme.