Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The latest is NavigationStack, which is still pathetic. The only way to navigate more than a level deep is to create an array of one datatype to serve as NavigationStack's "path." But this is designed to be an array of a single datatype. Look at the examples for this thing: They're applications that present a stack of views that each show... an INTEGER. In decades, I have never written an application that needed to stack up a pile of views that all show the same datatype.

You should probably read more of the documentation than looking at examples, "to create an array of one datatype" its far from the truth. NavigationPath can be use to route to more than one type https://developer.apple.com/documentation/swiftui/navigation...



Thanks, but I did read all the doc on this several times. Looking at it again, it reminds me of the fundamental problem conveyed that page: It assumes that you're using a different datatype for every view, and can thus set up NavigationDestinations for them.

But what if you're walking the user through several steps of acting upon the same datatype? Building some kind of message, for example. First add a recipient to the message. Then create and add some content to the message. Then choose delivery options for it. In each case I'm handing the Message object to the view.

Every avenue for using this thing seemed to be crippled by some blundering assumption. Until someone came up with making a special enum for every page, which is just another piece of hokey gymnastics and extra work to "trick" the UI into doing what you want.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: