I have the problem that I can't get the popover view of a Button
to fit the size of its content.
Here's what the problem looks like
And the Code:
Button(action: {
self.showColorDropDownMenu.toggle()
}, label: {
Circle()
.fill(Color.red)
.frame(width: 22, height: 22)
}).popover(isPresented: self.$showColorDropDownMenu) {
Text("Hello").background(Color.yellow)
}
I tried calling .frame(...)
with different arguments, but it doesn't seem to work on iPadOS
I saw another question here on SO, which talks about the same issue, but I can't comment, yet, so I can't ask if they found a solution and maybe there's another fix to it.