Learn about the new glass and glassProminent modifiers in iOS 26 :)
I have a solution for the circular button but it's pretty gross.
If you make your image/label 10 pixels less width than height it expands correctly in the tap animation.
Button(action: {
print("button pressed")
}, label: {
Image(systemName: "xmark")
.font(Font.system(size: 19, weight: .medium))
.frame(width: 50-10, height: 50)
})
.buttonBorderShape(.circle)
.buttonStyle(.glass)
I think the danger of that is if they change the pixel ratio in the future, then this will break...
Haha 100%! I did say it was gross :D
I have a solution for the circular button but it's pretty gross.
If you make your image/label 10 pixels less width than height it expands correctly in the tap animation.
Button(action: {
print("button pressed")
}, label: {
Image(systemName: "xmark")
.font(Font.system(size: 19, weight: .medium))
.frame(width: 50-10, height: 50)
})
.buttonBorderShape(.circle)
.buttonStyle(.glass)
I think the danger of that is if they change the pixel ratio in the future, then this will break...
Haha 100%! I did say it was gross :D