How do I make a UIButton with AttributedString a glass tint?
Asked on 2026-03-16
1 search
To create a UIButton with an AttributedString and apply a glass tint effect, you can use the new design features introduced in iOS 26. Specifically, you can use the UIButtonConfiguration to apply a glass appearance to your button. Here's a general approach based on the sessions from WWDC 2025:
-
Create a UIButton with AttributedString: Use
AttributedStringto style the text of your button. You can set attributes like font, color, and more. -
Apply Glass Tint: Use the
UIButtonConfigurationto apply a glass appearance. You can choose between standard glass and prominent glass, which tints the button with your app's tint color.
Here's a basic example in code:
import UIKit
let button = UIButton(type: .system)
var configuration = UIButton.Configuration.plain()
configuration.attributedTitle = AttributedString("Your Button Title", attributes: [.foregroundColor: UIColor.systemOrange])
configuration.baseBackgroundColor = .clear // Ensure the background is clear to see the glass effect
configuration.background = .glass // Apply the glass effect
button.configuration = configuration
For more detailed guidance, you can refer to the session Build a UIKit app with the new design (17:24) where they discuss controls and the use of glass appearances in UIKit.

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.

Meet Liquid Glass
Liquid Glass unifies Apple platform design language while providing a more dynamic and expressive user experience. Get to know the design principles of Liquid Glass, explore its core optical and physical properties, and learn where to use it and why.

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.
