Skip to content

Instantly share code, notes, and snippets.

@fobos531
Last active October 17, 2025 17:37
Show Gist options
  • Select an option

  • Save fobos531/22382668bb48cd66e0e1bc4ac79db68d to your computer and use it in GitHub Desktop.

Select an option

Save fobos531/22382668bb48cd66e0e1bc4ac79db68d to your computer and use it in GitHub Desktop.
GlassEffectContainer(spacing: 20) {
VStack {
Button {
} label: {
Label(is3DEnabled ? "2D View" : "3D View", systemImage: is3DEnabled ? "view.2d" : "view.3d")
.labelStyle(.iconOnly)
.foregroundStyle(Color.primary)
.padding(.top, 8)
}
.buttonStyle(.glass)
.glassEffectUnion(id: "mapOptions", namespace: unionNameSpace)
Button {
} label: {
Label("Location", systemImage: "location")
.labelStyle(.iconOnly)
.foregroundStyle(Color.primary)
.padding(.bottom, 8)
}
.buttonStyle(.glass)
.glassEffectUnion(id: "mapOptions", namespace: unionNameSpace)
}
}.tint(Color(UIColor { traitCollection in
traitCollection.userInterfaceStyle == .dark
? UIColor.systemGray3
: UIColor.white
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment