viewDidAppear not getting called

后端 未结 8 979
醉酒成梦
醉酒成梦 2021-01-12 00:17

In my main UIViewController I am adding a homescreen view controller as subviews:

   UINavigationController *controller = [[UINavigationController alloc] ini         


        
8条回答
  •  情话喂你
    2021-01-12 00:41

    My problem was that I was changing the tab in UITabBarController (selectedIndex = x) and then messing with the child view controllers in that tab. The problem is that it needs to be done the other way round: first mess with the child view controllers in other tab and then change the tab by setting the selectedIndex. After this change methods viewWillAppear/viewDidAppear begun to be called correctly.

提交回复
热议问题