As we know Apple have introduced NavigationStack
in SwiftUI available from iOS16.*
Let say I have created ViewA, ViewB, ViewC, ViewD
And now I have navigated like ViewA->ViewB->ViewC->ViewD
Now I am looking to pop to root view i.e on ViewA
from ViewD
Any help would be appreciated.
if you are using swift ui (with iOS 16 or greater), I would suggest to use