Every time I put an Image
as Menu
content in SwiftUI, I am unable to round its edges or clip its shape. I’d like my displayed image to be the shape of a circle.
Of course, I’ve tried .cornerRadius()
and .clipShape(Circle())
. Minimal example:
Menu("Ben") {
Toggle(isOn: .constant(true)) {
Label {
Text("Ben")
} icon: {
Image("blueGradient")
.resizable()
.clipShape(Circle())
}
}
}