You can make the .windowResizability(.contentSize) scene modifier conditional like so:
extension Scene {
func windowResizabilityContentSize() -> some Scene {
if #available(macOS 13.0, *) {
return windowResizability(.contentSize)
} else {
return self
}
}
}
And then use it on WindowGroup this way:
WindowGroup {
...
}
.windowResizabilityContentSize()
Post
Replies
Boosts
Views
Activity
Changing the NavigationView's style to .stack seems to do the trick for me. This has solved other navigation-related problems in the past for me as well.
You need to apply the modifier directly to the NavigationView, not to its contents:
NavigationView {
ShoppingListsView()
}.navigationViewStyle(.stack)