I'm working on a UIKit-based iOS app and would like to use the new GlassEffectContainer with liquid glass
effects introduced in iOS 26 beta.
Currently, I have two buttons (heart and comment) in a UIToolbar and want to wrap them in a glass effect container to get the morphing/blending effect when they're close together.
The API appears to be SwiftUI-only:
GlassEffectContainer
.glassEffect() modifier
Is there a UIKit equivalent, or is the recommended approach to embed a SwiftUI view using UIHostingController?
I'm already using UIVisualEffectView with UIGlassEffect elsewhere, but that doesn't provide the liquid morphing behavior between multiple views.
From, "Applying liquid glass" article:
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
// An `offset` shows how Liquid Glass effects react to each other in a container.
// Use animations and components appearing and disappearing to obtain effects that look purposeful.
.offset(x: -40.0, y: 0.0)
}
}
Thanks!
Selecting any option will automatically load the page