I have a case where one of my SwiftUI Views is automatically going back to previous screen on a published variable change, which is not related to isActive. I want to stop navigating the swiftUI view onViewWillDisappear(). How can I stop SwiftUI from navigating just before it is navigating.
Asked
Active
Viewed 341 times
0
-
Could you provide a code example, please? Because it's not clear what is going on in your code – igdev Oct 26 '21 at 12:36
-
1Does [this question](https://stackoverflow.com/questions/67453082/setting-a-stateobject-value-from-child-view-causes-navigationview-to-pop-all-vie/67453323#67453323) help? Also, see: [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example). – Yrb Oct 26 '21 at 13:27