I refuse to sleep until I have found a solution to this, which is unfortunate, as it means I may never sleep again 🥲
I've now officially arrived in crazy town, and started wrapping UINavigationController myself.
What's interesting is that the SwiftUI environment is still automatically adding nav items to the controller, so I've actually got the same broken animations as with NavigationStack. At least it’s…consistent.
Running out of ideas now 😅
@phill You can build your own NavigationView with pure SwiftUI. It works *way* better.
A lot of the bugs in SwiftUI come from buggy wrappers around UIKit. This is why it’s better on WatchOS and even worse on the Mac.
Pure SwiftUI, when not using views that wrap complex UIKit views tend to work much better and be less buggy.
It’s a lot of work, but you’ll get many benefits too. E.g. MatchedGeometryEffecf across pages which doesn’t work with NavigationView/Stack
@phill “Uncanny Valley” is a fair concern which is why we decided to deviate further from the “default” look.
RE: Erasure/AnyView, works well in this use-case IMO. Since the Screen/Route View is the one getting erased, it doesn’t matter since whenever you change the route you want a fresh render anyway.