TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Undo a backward move when using NavigationStack

Forums > SwiftUI

When I navigate backward (like swiping the view from the left), I want to be able to drag it back from the right to move to that previous view. Sort of like an undo stack. I asked this question on StackOverflow and the solution there works, but doesn't feel "native": I want the full dragging-of-the-view effect just like in the native navigation. Is it possible to use NavigationStack or other existing views to solve that?

2      

Hacking with Swift is sponsored by String Catalog.

SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!

Localize My App

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.