Using GlassEffectContainer with UIKit

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!


The new Liquid Glass APIs are certainly not SwiftUI-only. They are available in UIKit and AppKit.

You should use UIGlassContainerEffect to get the effects of morphing and grouping.

[Documentation] When using UIGlassContainerEffect with a UIVisualEffectView you can add individual glass elements to the visual effect view's contentView by nesting UIVisualEffectViews configured with UIGlassEffect. In that configuration, the glass container will render all glass elements in one combined view, behind the visual effect view's contentView.

You might also want to checkout Adopting Liquid Glass and Build a UIKit app with the new design to learn how to take full advantage of the new design system.

Using GlassEffectContainer with UIKit
 
 
Q