The ScrollView does not impact the result so I wouldn't put much into that. Just silences the error.
But in case it helps anyone else, I did notice a difference while working on reproducing the issue.
A consistent issue is animation oddities rending the label of the button when it changes as a result of a Menu selection. Imagine a button that's title changes based on the option that is picked. If the text changes from a short string to a long string, the animation partially updates, then snaps back into place.
But the stranger thing is the Menu itself. This doesn't happen for a simple screen with just the menu. But with a more complicated screen, when attached to Xcode and running with the debugger attached, the Menu renders its options fine. I mean, the selectable options within the Menu are laid out inside of the menu.
But when the app is run not via Xcode, I notice the menu really misbehaves. The options may lay out to the bottom left of the button that presented the menu, but the menu's platter will start in the top right. Then after half a second or so it'll jump to the bottom left and encapsulate the menu options, though it may be sized wrong. I could reliably reproduce this while not connected to Xcode. Just in case it helps someone else as they work around this.
That was what lead me to the Scroll fix attempt, but just turned out I got the correct menu layout while connected to Xcode.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: