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

Asked on 2025-09-12

1 search

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

  1. Declare a Local Namespace: Start by declaring a local namespace to manage the glass effect elements.

  2. Use the Glass Effect Modifier: Apply the glass effect using the glossEffect modifier. This modifier allows you to add a glass-like appearance to your views.

  3. Customize the Effect: You can customize the shape of the glass effect by providing a shape to the modifier. For interactive elements, you can add the interactive modifier to make the glass react to user interactions.

  4. Apply to FullScreenCover: When using fullScreenCover, ensure that the background or the content of the cover uses the glass effect to achieve the desired visual style.

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.