Can you point me a guide/tutorial/sample how to implement this correctly?
I just want in the first view (it's a view controller) there's a button. Clicking the button will go to the 2nd view. The 2nd view will have a navigation controller and a table view (the table view will drill down to the 3rd view).
Most tutorial I've found, they added the navigation controller to the main window and the 开发者_如何学运维root view controller is called from navigation controller.. but what if it's the other way around just like my case? Is it possible? how?
Thanks
Just make your first view have the navigation controller, but hide the nav bar. Then, push your other view controllers as you would otherwise. A tutorial for a table with a navigation controller can be found here.
I suspect that your 'first VC' is some sort of menu and that from there on you want to start your NavController?
You can start a NavController from any point in your flow, downwards.
The easiest way for you now is to follow any NavController tutorial, right from scratch. When that is working okay, just add a new VC (which will become your mainmenu) right before the initial NavController. In the Storyboard you can drag the 'initial view controller' (the short arrow from nowhere) to your menu view controller. Connect your new View to the NavController and it works.
Not really a tutorial, I don't think there is any. I hope this helps.
精彩评论