I want to add a glass effect to a fullScreenCover. How to in Swift?

Asked on 2025-09-12

1 search

To add a glass effect to a fullScreenCover in SwiftUI, you can use the new Liquid Glass effect introduced in the latest design updates. Here's a general approach based on the information from the WWDC sessions:

  1. Use the Gloss Effect Modifier: Apply the gloss effect modifier to your views. By default, this effect is applied within a capsule shape behind your content.

  2. Create a Glass Effect Container: If you have multiple elements that need to interact visually, use a glass effect container to group them. This ensures consistent visual results as the glass material samples content from an area larger than itself.

  3. Customize the Appearance: You can customize the shape of the gloss effect by providing a shape to the modifier. For important views, use the Tint modifier to convey meaning.

  4. Interactive Elements: For interactive elements, add the interactive modifier to the gloss effect. This allows the glass to react to user interactions by scaling, bouncing, and shimmering.

For more detailed guidance, you can refer to the session Build a SwiftUI app with the new design (17:57) where Liquid Glass effects are discussed.