Michael Long
5 days ago

--

Just an fyi, but I added a state uuid to screen 2

@State var id = UUID().uuidString

Displayed it, and then updated the tap gesture to the following....

path = [.screen2, .screen3]

And then tried

path = Array(path.dropFirst())

In both cases, rearranging the navigation stack loses state on the second screen.

Unfortunately, this means that it's not like a UINavigation controller whose list of UIViewControllers can be manipulated at will. :(

Also not fond of the restriction to a single navigation destination type that avoiding NavigationPath requires.

Fun article though!

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

Responses (1)