I have an array of UIViewControllers that I display in my Root View Controller of a UINavigationController... I have an issue with one of my controllers that I push on the stack. It needs to present a UIImagePickerController each time viewDidLoad, however only does so the first push. To get around this I implement UINavigationControllerDelegate in my Root View Controller:
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
[viewController viewDidAppear:animated];
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
[viewController viewWillAppear:animated];
}
The problem is it calls these messages twice the first push... otherwise would be great. What am I missing?