HomeiOS DevelopmentEasy methods to present/cover iOS toolbar buttons with fancy Liquid Glass animation?

Easy methods to present/cover iOS toolbar buttons with fancy Liquid Glass animation?


I am constructing an iOS 26+ SwiftUI app that includes Liquid Glass and conditional buttons that seem in sure situations.

For instance, a Trash toolbar button that seems when then a textfield has textual content, however disappears when the textfield is empty:

if !textual content.isEmpty {
    ToolbarItem(placement: .topBarTrailing) {
        Button { textual content = "" } label: { Picture(systemName: "trash") }
    }
}

I need the toolbar buttons to look and disappear utilizing Apple’s fancy new Liquid Glass blob morphing results.

Nevertheless the above code merely instantly reveals/hides the toolbar button with no obvious "liquid, flowing, morphing" animation as proven within the Apple video.

Easy methods to present/cover iOS toolbar buttons with fancy Liquid Glass animation?

Notice: Tapping the button does add some Liquid Glass impact, however when the button is proven/hidden through unrelated actions it merely blinks out and in of existence.

Is there a approach so as to add a toolbar button utilizing inventory, native iOS animations in order that it will get the flamboyant shrinking morphing Liquid Glass look and disappearance?

The query right here has gifs displaying each the straightforward animation and fancy Liquid Glass animation when switching/including buttons, however not for displaying/hiding a button set fully.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments