Instance Method

colorScheme(_:)

Sets the view’s color scheme.

Declaration

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

Parameters

colorScheme

The color scheme for this view.

Return Value

A view that sets this view’s color scheme.

See Also

Adopting View Color Schemes

enum ColorScheme

The possible types of color schemes, like Dark Mode.

func preferredColorScheme(ColorScheme?) -> View

Sets the preferred color scheme for this view.

struct PreferredColorSchemeKey

A key for specifying the preferred color scheme.

func accentColor(Color?) -> View

Sets the accent color for the view and the views it contains.