MaterialActiveAppearance
The behavior for how materials appear active and inactive.
Declaration
struct MaterialActiveAppearanceOverview
On macOS, materials have active and inactive appearances that can reinforce the active appearance of the window they are in:
Materials used as a
windowcontainer background andbarmaterials will appear inactive when their containing window is inactive.All other materials will always appear active by default.
An explicit active appearance can be set to override a material’s default behavior. For example, materials used as the window container background can be made to always appear active by setting the active appearance behavior to be always active:
Text("Hello, World!")
.containerBackground(
Material.regular.materialActiveAppearance(.active),
for: .window)