Popovers
Popovers copied to clipboard
Popover doesn't position properly
In the picture attached, I have attached the popover to the last box in the grid and still the popover opens up a bit left of the source view and not directly under it. In other words, I want to get rid of the space shown by the arrow in the screenshot. Any ideas?
This is the code I am using:
.popover(present: $popoverShown) {
VStack {
Text("This is a pretty standard-looking popover with an arrow.")
.foregroundColor(.primary)
.onTapGesture {
print("ok")
}
}
.padding()
.background(.background)
.cornerRadius(12)
.shadow(radius: 1)
.frame(maxWidth: 150)
}