There are two UIViewControllers in my iPhone application; both are built into the UITabBarController. However, when the TabBarController and VC switch are connected, the VC on the screen loads the data into NSUserDefaults, and then the transition VC retrieves this data from NSUserDefaults.
What I'm doing now is load the data into viewWillDisappear from the first VC, and then extract it into viewWillAppear of the second VC. the problem is that viewWillAppear from VC, which is about to appear on the screen, is called before the ViewWillDash view from the "old" VC , so it tries to get data that has not yet been loaded.
What can I use, so the βold VCβ is the first one to know when it is about to go to the screen so that it can load data before the new one retrieves this data?
* I also tried to configure UITabBArControllerDelegate so that the old VC would get - tabBarController: didSelectViewController: but this is also called too late.
source share