开发者

Navigating to Second View in TabController calls First View's "viewDidLoad"

开发者 https://www.devze.com 2023-01-10 03:07 出处:网络
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 cal

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 b开发者_如何学Cut I'm not sure what part might pertain to this, so let me know if you need any snippets.

Thanks,

Dave


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消