how do I tint a UIButton glass variant?

Asked on 2026-02-10

1 search

To tint a UIButton with the glass variant, you can use the new Liquid Glass effect introduced by Apple. Here's a brief overview of how you can achieve this:

  1. Create a UI Glass Effect: Use the UIVisualEffectView to create a new UI glass effect. This allows you to apply a custom tint color to the glass.

  2. Assign a Custom Tint Color: Set the tint color on the glass to highlight prominent views. This can be done by creating a new UI glass effect and assigning your desired tint color.

  3. Animate the Effect: You can animate changes to the glass effect, including the tint color, to create dynamic interactions.

  4. Use Prominent Style: For buttons that need to stand out, you can set the style to prominent, which will tint the glass using your app's tint color.

For more detailed guidance, you can refer to the session Build a UIKit app with the new design (17:24) where controls and custom elements are discussed, including how to use the glass effect with buttons.