Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your question is a little bit like asking why <code>UISplitViewControllers</code> use two controllers and lay their views out side-by-side. That is, <code>UINavigationControllers</code> use <code>pushViewController:</code> to manage their stack of <code>UIViewController</code> instances because that's how Apple decided <code>UINavigationControllers</code> should work. When animated into view, pushed views will slide in from the right and old views slide in from the left when a view is popped.</p> <p>ANY instance of a <code>UIViewController</code> can use <code>presentModalViewController</code> to display the view of another <code>UIViewController</code> over top of it's own view in a manner which prevents the user from interacting with the view underneath. Depending on the device (iPhone, iPad) you have various options for the visual appearance of the newly presented view and the animation used to bring it into view.</p> <p>There's nothing stopping you from writing an application that just keeps having one view bring up the next view using <code>presentModalViewController</code> but there'd be no reason to use a <code>UINavigationController</code> to do so. I've never checked if there was a meaningful difference in memory consumption or any other thing you could measure to judge whether doing so is "sub-optimal" from a technical perspective, but it's certainly not the norm so might be sub-optimal from the user experience perspective. Whether that is true or not for your app depends on whether users seem to think the interaction makes sense to them.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload