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

Asked on 2025-09-12

1 search

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

  1. Create a UI Visual Effect View: This view will host the glass effect.
  2. Configure the Glass Effect: Use the new UI Glass Effect in an animation block to set the effect. The glass appears using a special materialized animation.
  3. Customize the Shape: By default, the glass is in a capsule shape. You can customize the shape using the new corner configuration API.
  4. Add Content: Use the Visual Effects view's content view to add labels and images. The content will automatically become vibrant based on its text color, ensuring legibility against various backgrounds.
  5. Dynamic Adaptation: The glass effect adapts to light and dark modes automatically to increase contrast. It also adapts its appearance based on its size and proximity to other glass elements.

For more detailed guidance, you can refer to the session Build a UIKit app with the new design (19:15) where custom elements and the glass effect are discussed.