ios – popovertip expands to the entire width of the display screen

0
67


I’m utilizing the SwiftUI new TipKip popovertip modifier so as to add a tooltip on high of my view.

@ViewBuilder
func makeScheduledCardWithTooltip() -> some View {
    var shouldAddTooltip: Bool {
        //... not vital for this context
        
        return true
    }
            
    if shouldAddTooltip, #accessible(iOS 17.0, *) {
        // Have so as to add right here as the entire struct must help iOS 16
        let tip = LongPressAlarmTooltip()
        
        Rectangle()
            .popoverTip(tip, arrowEdge: .backside)
    } else {
        Rectangle()
    }
}

Now the problem is, I need the tooltip to be smaller and never take the entire width, at present it expands all the best way.

Within the picture under, for those who see it goes edge to edge on the display screen.

enter image description here

I made a perform a lot easier to observe. However for simplicity, think about this perform is within the ContentView and is within the physique like:

var physique: some View {

}