I have a main tabController that has two tabs, first one is selected as default. When tab2 is pressed, file is loaded on a webview but you must wait few seconds. How could I load content before tab2 will be selected? I tried to call carrega (containing working ViewDidLoad code) function once tabController was set and is executed properly, however when tab2 is selected, content is blank… Thank you.
from delegate,
viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil];
[tabBarController setViewControllers:viewControllers animated:NO];
[self.window makeKeyAndVisible];
[firstVC carrega];
[secondVC carrega];
//now few seconds later, tab2 will be pressed and should have content already loaded!
second viewController,
-(void)carrega{
//here my loading content code that if is on ViewDidLoad works great but with loading timeout
}
Try
To force the second view to load.