2
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]

Curious to start a discussion around the usage of NavigationView or the new NavigationStack in a complex app structure.

How people have implemented these in their own Apps or if they even use these, or have they come up with their own custom solutions?

I’ll start:

I experimented with a custom solution (not using navigationview or stack at all) using ZStacks on the topmost level of the application essentially. I’ve seen significant improvement in performance and cleaner code execution allowing me to route views inside nested sub views simply referencing an EnvironmentValue. But, the downside is losing the out of the box, didAppear and didDissappear lifecycle events.

I see NavigationStack is following suit with storing a stack of paths to route. But, sadly doesn’t support iOS 15. Using UIKit’s navigation controller is kind of a pain when wanting to support all 3 platforms too.

But, I wonder if others have done some analysis on trade offs regarding Navigation. Since it’s kind of the cornerstone of an Application as a whole.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 04 Sep 2023
2 points (100.0% liked)

SwiftUI

109 readers
2 users here now

SwiftUI helps you build great-looking apps across all Apple platforms with the power of Swift — and surprisingly little code.

This is a community for people that use SwiftUI, want to learn SwiftUI or want to show off their creations with SwiftUI.

Want to learn SwiftUI?

Try out Paul Hudson's free 100 Days of SwiftUI course


We expect a civil and constructive discourse in this community.

Piracy:

Bootstrapping:


Other communities on related topics

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

founded 1 year ago
MODERATORS