Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your fundamental problem is that you are getting your different parent-child hierarchies confused.</p> <p>To recap: MVC is Model, View and Controller.</p> <p>iOS has TWO different parent-child hierarchies: One for the controllers and one for the views.</p> <p>The following are part of the controller parent-child hierarchy:</p> <pre><code>- TabBarController - LugaresNavController (UINavigationController) - LugaresViewController (UIViewController) </code></pre> <p>This means that LugaresViewController.parentViewController should be LugaresNavController and so on.</p> <p>However the following doesn't make any sense:</p> <pre><code>- SubView (UIView) - MapViewController (UIViewController) - TableViewController (UITableViewController) </code></pre> <p>Views can have subviews but views can't have subviewcontrollers,</p> <p>Are you doing the following?</p> <pre><code>- SubView (UIView) - MapViewController.view (UIViewController s view is a subview of Subview) - TableViewController.view (UITableViewController s view is a subview of Subview) </code></pre> <p>This is a view parent-child hierarchy. This means that:</p> <ol> <li>SubView has two subviews (MapViewController.view and TableViewController.view)</li> <li>MapViewController.parentViewController is nil.</li> <li>MapViewController.navigationController is nil.</li> </ol> <p>you can use view transtions to switch between MapViewController.view &amp; TableViewController.view but not viewController transitions (such as presentModal... or push or pop ViewController...).</p> <p>If this is what you want, then you just have to make sure that you do:</p> <pre><code>[SubView addSubview: MapViewController.view]; [SubView addSubview: TableViewController.view]; </code></pre> <p>Incidentally, SubView is a terrible name. Usually we call those containerView or something like that. subview is such an important concept you want to be able to diffrentiate the concept of a subview from the instance of that view. It's like naming your child "Kid" or your dog "Puppy".</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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