Follow

NavigationStack loses its navigation bar on iPad when returning from the background, making it impossible to go back or do anything. iOS 16 and 17.

FB13120953

gist.github.com/phillipcaudell

@phill
You could launch iPhone-only first? I’d wager most people don’t have an iPad.

@shauny that's definitely an option! It's just iPad is frustratingly close to finished; these last little things are letting it down.

@phill
Do you have the same issue without checking the sizeClass?
I tried a few similar things with dynamicly changing navigation paths and ran into a few issues. My theory is NavigationStack does not like being changed or presented with a populated stack.

See github.com/simonnickel/FB13080

@simonnickel Yeh it's 100% caused by switching on the size class. The irony is I'm only doing so because of a separate issue with NavigationSplitView (mastodon.notsobig.co/@phill/11).

Your problem looks similar though. I've had some mild success now by tying the lifetime of the State directly to the NavigationStack. Both get destroyed together (keeping the Stack happy). The State can then be restored through some other mechanism (like a Binding) gist.github.com/phillipcaudell

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.