How to use new glass effect

Asked on 06/12/2025

1 search

To use the new glass effect in your app, you can follow these steps based on the sessions from WWDC 2025:

  1. Creating Glass Effects:

    • In UIKit, create a UI Visual Effect view and set the effect to a new UI glass effect within an animation block. By default, the glass appears in a capsule shape, but you can customize it using the new corner configuration API. The glass adapts to light and dark modes automatically based on the user interface style (Build a UIKit app with the new design).
  2. Using Liquid Glass:

    • Liquid Glass is designed to be an interactive layer that floats above your content. It is best used for important elements like custom buttons that need to stand out. To use it, create a UI Visual Effect view and configure it with the glass effect (Build a UIKit app with the new design).
  3. Grouping Glass Elements:

    • When you have multiple glass elements, use a glass effect container to group them. This allows them to share their sampling region, providing a consistent visual result. The glass material reflects and refracts light, picking colors from nearby content (Build an AppKit app with the new design).
  4. Animating Glass Effects:

    • You can animate changes to the glass effect, such as its tint color or content. For example, when you no longer need the glass on screen, animate it out by setting the effect to nil (Build a UIKit app with the new design).
  5. SwiftUI Integration:

    • In SwiftUI, use the Glass Effect ID modifier to add transitions to your glass container. This allows for fluid morphing of elements like badges when they expand or contract (Build a SwiftUI app with the new design).

These steps provide a comprehensive guide to implementing the new glass effect in your app, enhancing its visual appeal and interactivity.

How to use new glass effect | Ask WWDC