Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>So if I understand correctly you have a tab bar controller which includes the navigation controller as one of the tabs, the navigation controller creates a table view controller in its viewDidLoad method, and pushes it immediately.</p> <p>viewDidLoad is a good time to do the loading (which you did) and a bad time to do behaviour, like pushing the view.</p> <p>You could try moving the pushViewController part to <code>-viewDidAppear:animated:</code>. this should give you the table view, but it will still behave a little funny cause you'll have a back button that causes the table to disappear then immediately be pushed again.</p> <p>The best way to go about this is to set the table view controller as the root view controller of the navigation controller.</p> <h2>UPDATE:</h2> <p>Seems like there's a blur of what controller should do what here.</p> <h2>Tab Bar Controller:</h2> <p>don't subclass it, put the navigation view controller as one of the tabs. You got this part right already I think.</p> <h2>Navigation Controller</h2> <p>Don't subclass it, initialize it with your table view controller as the root view controller. Unless you are trying to make the navigation controller do something completely different from what it usually does, there is rarely any need to subclass it.</p> <h2>Table View Controller</h2> <p><strong>Subclass this</strong>. It does 90% of the overhead work for you off the top, all you have to do is write implementations for the data source and delegate methods.</p> <p>This might seem funny at first cause you'll need to initialize them in reverse order. Your app delegate should init the table view controller, then initialize the navigation controller with the table view controller as root, then initialize the tab bar controller with navigation controller as one of the tabs. This is a tricky stack of controllers to get right at first.</p>
    singulars
    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. 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.
 

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