I want to open a dropdown Menu on macOS when the user clicks on an Image.
I am using Mac Catalyst Interface: Optimize for Mac.
I was previously able to accomplish this using the .buttonStyle(.plain)
Here is the code:
Menu {
Button {
//action here
} label: {
Text("first button")
}
Button {
//action here
} label: {
Text("second button")
}
} label: {
Image(systemName: "arrow.up.arrow.down.circle")
.resizable()
.scaledToFit()
.foregroundColor(Color("SSGreen"))
.frame(width: scaleForMac(int: 34), height: scaleForMac(int: 34), alignment: .center)
}
.buttonStyle(.plain)
Since I upgraded to Ventura 13.3.1 this no longer seems to work. Now I get a tiny down facing arrow and the image does not render.
Before:
After:
Am I doing something wrong, how can I continue to achieve the same result of being able to have a custom view trigger a menu?
Tried to create a custom buttonStyle
and a custom menuStyle
but did not manage to achieve desired outcome.