我有一個加載UITabBarController的類。每個選項卡打開一個UINavigationController。從UITabBar預加載視圖
我想在我的UINavigationControllers中預加載視圖。我試過這樣做:
UITabBarController * tabBarController = (UITabBarController *)self.centerController;
NSArray *myViewControllers = tabBarController.viewControllers;
for (UINavigationController *navViewController in myViewControllers)
{
[navViewController loadView];
}
我嘗試過不同的事情,但它永遠不會被加載。難道我做錯了什麼?
很高興我能幫上忙 –