How to apply Liquid Glass effect to UIButton
Asked on 2025-07-31
1 search
To apply the Liquid Glass effect to a UIButton
in a UIKit app, you can follow these steps:
-
Use the Glass Configuration: UIKit provides new glass appearances for buttons. You can use the
UIButtonConfiguration
to apply these appearances. There are two types of glass configurations: standard glass and prominent glass, which is tinted with your app's tint color. -
Create a UI Visual Effect View: For custom views, you can create a
UIVisualEffectView
and apply a new UI glass effect within an animation block. This allows the glass to appear using a special materialized animation. -
Customize the Shape: By default, the glass effect is in a capsule shape. You can customize this shape using the new corner properties.
-
Interactivity: To make the button interactive, set
isInteractive
totrue
on the glass effect. This will allow the button to scale and bounce when tapped, providing a more engaging user experience. -
Animation: When you no longer need the glass on screen, animate it out by setting the effect to
nil
. This ensures that the glass dematerializes with the appropriate animation.
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 use of Liquid Glass are discussed.

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.

Platforms State of the Union
Discover the newest advancements on Apple platforms.