How do I make a UIBarButtonItem with AttributedString glass with a tinted color?

Asked on 2026-03-16

1 search

To create a UIBarButtonItem with an AttributedString and apply a tinted color using the new Liquid Glass design, you can follow these steps based on the information from the WWDC sessions:

  1. Use Liquid Glass for Tinting: Liquid Glass allows you to tint UI elements easily. You can apply a tint color to emphasize primary elements and actions in your UI. This is discussed in the session Meet Liquid Glass.

  2. Set Tint Color: When creating your UIBarButtonItem, you can specify a tint color to highlight the button. This is particularly useful for buttons that need to stand out, as mentioned in the session Build a UIKit app with the new design.

  3. Use Attributed Strings: For fine-grained adjustments to the title and subtitle of navigation items, you can use attributed strings. This allows you to customize the appearance of text within your UIBarButtonItem. This is covered in the session Build a UIKit app with the new design.

By combining these techniques, you can create a UIBarButtonItem that uses an AttributedString for its title and applies a tinted color using the Liquid Glass design principles.

How do I make a UIBarButtonItem with AttributedString glass with a tinted color? | Ask WWDC