How use uiGlassConainer
Asked on 2026-01-14
1 search
To use uiGlassContainer, you can follow these steps as outlined in the session "Build a UIKit app with the new design" from WWDC 2025:
-
Create a UI Visual Effect View: Start by creating a
UIVisualEffectViewand configure it with theUI Glass Container Effect. -
Add Glass Views: Create your glass views and add them as subviews to your container's content view. As long as there is space between them, they appear as separate views. If they get closer, they start merging like small droplets of water.
-
Control Interaction: Use the
spacingproperty on theUI Glass Container Effectto control the distance at which glass views start affecting each other. When animating into an overlapping frame, glass views combine into a single shape. -
Dynamic Adaptation: Glass dynamically adapts to its background but maintains a consistent appearance. It can seamlessly blend between different shapes and adapt its appearance automatically when added to an existing glass container.
-
Interactivity: For interactive elements, set
isInteractiveto true on the glass effect to enable interactions like scaling and bouncing.
For more detailed guidance, you can refer to the session Build a UIKit app with the new design (19:15) which covers custom elements and the use of uiGlassContainer.

Build a UIKit app with the new design
Update your UIKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Build a SwiftUI app with the new design
Explore the ways Liquid Glass transforms the look and feel of your app. Discover how this stunning new material enhances toolbars, controls, and app structures across platforms, providing delightful interactions and seamlessly integrating your app with the system. Learn how to adopt new APIs that can help you make the most of Liquid Glass.

Build an AppKit app with the new design
Update your AppKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.
