Tutorial :Navigating to Second View in TabController calls First View's “viewDidLoad”



Question:

As the subject says, I have a project based on Apple's TabController template. The problem is that when navigating to Second View in the TabController, the First View's "viewDidLoad" method is called. The second view's method is NOT called.

Any idea what might cause this? I would post code but I'm not sure what part might pertain to this, so let me know if you need any snippets.

Thanks,

Dave


Solution:1

Have you specified the right class for each of the view controllers, in IB? It's in the inspector window, rightmost tab. That class will be instantiated and get the viewDidLoad message.

By the way, in the newer SDK versions you have to hit save from within IB to see the changes in your project. (at least that happened here after an upgrade)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »