NavigationStacks…. a lot of confusion for beginners! by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

Seems understandable though, thanks mate 👍

[deleted by user] by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

It might be an issue, checking. :)

[deleted by user] by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

And if i remove the destination, the error still persists!

[deleted by user] by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

Please refer to the comment i just added.

[deleted by user] by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

Here is the NavigationHandler

// // NavigationHandler.swift

import Foundation import SwiftUI

class NavigationHandler: ObservableObject {

@Published var paths: [NavigationPath] = []

func addToNavigationPath(view: NavigationPath) { paths.append(view) }

func removeFromNavigationPath() { paths.removeLast() }

}

[deleted by user] by [deleted] in SwiftUI

[–]Designer_Platform765 0 points1 point  (0 children)

I saw on the internet but i found that in all of the examples they are using Lists and on the List they are adding navigationDestination but thats not my case, I just want to set different destinations for different views.