In an iOS app, to move between screens, I can either present a new ViewController ("move forward") or dismiss a current ViewController ("move backward").
In my naive understanding, this is simply a way of moving back and forth in the stack of ViewControllers kept by the app.
I have an intuitive preference for dismissing a ViewController (where possible) rather than presenting a new ViewController. It gives me the feeling of operating within a finite set of ViewControllers which in turn makes me feel the app is memory efficient.
Say I am on View A and want to show View B, then presenting A would result in a stack A-B-A whereas dismissing B would keep the stack at A.
My question is this: is that justified? is there any (programmatic) downside to perpetually working by presenting new ViewController? Is it memory inefficient?
I wonder how many previous Views are being saved by the app and how long the stack could get, and if that is a reason to dismiss whenever possible.