I'm trying to apply a tinted glass effect to toolbar buttons in iOS 26, similar to what was shown in the WWDC25 videos, but none of the approaches I've tried produce the translucent tinted glass effect.
My code structure:
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
TrailingToolbarContent(
selectedTab: $selectedTab,
showingAddBeneficiary: $showingAddBeneficiary
)
}
}
private struct TrailingToolbarContent: View {
@Binding var selectedTab: Int
@Binding var showingAddBeneficiary: Bool
@EnvironmentObject private var settingsViewModel: SettingsViewModel
var body: some View {
switch selectedTab {
case 1:
if #available(iOS 26.0, *) {
Button(action: { showingAddBeneficiary = true }) {
Image(systemName: "plus")
}
// What I've tried:
// .tint(Color("accentPrimary")) // Only changes icon color
// .glassEffect(.regular.tint(Color("accentPrimary"))) // No effect
// .buttonStyle(.glass).tint(Color("accentPrimary")) // No tint, but orange background
// .buttonStyle(.borderedProminent).tint(Color("accentPrimary")) // Works but seems opaque, not glass
}
// ... other cases
}
}
}
What's the correct way to achieve tinted glass effects on toolbar buttons?
Topic:
UI Frameworks
SubTopic:
SwiftUI