We've had the same problem and managed to solve it reliably.
It seems that on first launch the system doesn't fully initialise the liquid glass shared background. When you navigate away and back it gets rebuilt and is then applied properly.
Why? I cannot say. I believe this to be a bug on Apple's side.
On your TabView
, attach an .id
and increment it inside .onAppear
. This forces the TabView to very quickly redraw, resulting in the glass showing immediately.
@State private var glassNonce = 0
TabView {
// Your content
}
.id(glassNonce)
.onAppear {
DispatchQueue.main.async { glassNonce &+= 1 }
}
This, for us, has forced the glass to appear immediately.