I have a UITabBarController whose tabs is a UINavigationController. I initialized every navigationController:
iPhoneApp *appDelegate = (iPhoneApp *)[[UIApplication sharedApplication] delegate];
[appDelegate.navigationController2 initWithRootViewController:countryController];
Then deploy the navigation controller with:
[self.navigationController pushViewController:myViewController animated:YES]
I want to appear at the root of my navigation controller (s) when the user clicks on the tabBar tab.
[delegate.navigationController2 popToRootViewControllerAnimated:NO]
This seems to work fine when I only pushViewController at one level, but it fails when I expand several levels in my navigation controller. What happens is that it appears to the root, but does not contain my hand stand or name:
self.navigationItem.title = @"My title";
self.navigationItem.hidesBackButton = YES;
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStyleDone
target:self
action:@selector(handleBack:)];
If I do not poptoroot and just use the NavigationControlls navigation button, everything works correctly.
I registered my view controllers before and after I poptoroot
: MainCountryController: 0x3d53650, IndividualCountryMfgViewController: 0x3d67d50, IndividualCountryProductViewController: 0x3d60870
, : MainCountryController: 0x3d53650
, .
- ? .