How to display toolbar button state in Liquid Glass?

Hey Team,

In my app there are bordered toolbar buttons with a button type of toggle.

Before Liquid Glass, such a button with an on state would paint its template image in accent color.

After removing UIDesignRequiresCompatibility, these buttons no longer show their state.

What is the best practice to migrate these buttons to Liquid Glass?

Thank, Ari

Answered by Frameworks Engineer in 892249022

Use the .pushOnPushOff style for buttons that show state in the toolbar to get the expected highlight effect in Liquid Glass!

Accepted Answer

Use the .pushOnPushOff style for buttons that show state in the toolbar to get the expected highlight effect in Liquid Glass!

How to display toolbar button state in Liquid Glass?
 
 
Q