I'm trying to currently implement
ViewDeck and although that isn't a problem, the viewWillAppear method of the view controller is! I'm creating the ViewDeck with the following code:
Code:
UIViewController *viewController1 = [[CombinedNewsViewController alloc] initWithNibName:@"CombinedNewsViewController" bundle:nil];
if (VIEWDECK_ENABLED) {
UIViewController *selectorController = [[NewsNavigationMenuViewController alloc] init];
IIViewDeckController* deckController = [[IIViewDeckController alloc] initWithCenterViewController:viewController1 leftViewController:selectorController];
deckController.navigationControllerBehavior = IIViewDeckNavigationControllerIntegrated;
viewController1 = deckController;
}
viewController1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
if (TABBAR_ENABLED) {
self.tabController = [[UITabBarController alloc] init];
self.tabController.viewControllers = [NSArray arrayWithObjects:viewController1, nil];
self.window.rootViewController = self.tabController;
}
else {
self.window.rootViewController = viewController1;
}
[window makeKeyAndVisible];
return YES;
The viewWillAppear method of the UIViewController isn't being called and I understand why because viewWillAppear is only called on the top most view, which in the above is the navigation controller.
The view hirarchy needs to be as per above otherwise hidesBottomBarWhenPushed doesn't work and I obviously don't want to put all my code in viewDidLoad. Therefore is there any may of passing a call down the view hierarchy so that viewWillAppear of the UIViewController is called? I don't want to call it manually because things start to go wrong, very wrong!
For some reason this one really has me stumped, so if there is a way, please make it as clear as possible