Hi Marcio,
Thanks for your feedback.I used that method but only viewWillAppear method only getting called
-(void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
{
NSUInteger count=[[(UINavigationController*)viewController viewControllers] count];
[[[(UINavigationController*)viewController viewControllers] objectAtIndex:(count-1)] viewWillAppear:YES];
[[[(UINavigationController*)viewController viewControllers] objectAtIndex:(count-1)] viewWillDisappear:YES];
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[viewController viewWillAppear:YES];
[viewController viewWillDisappear:YES];
}
- (void)navigationController:(UINavigationController *)navigationController
didShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[viewController viewDidAppear:animated];
}
Actually these methods are working fine if i use directly with out using Tabbar.My app is Tabbar based app.i am adding 5 navcontrollers to tabbar.
Afer using the above methods i am getting called viewWIllAppear , So i repeated the same code for viewWillDisapper also. BUt it is not getting called.
Please suggest, if i am doing anything wrong or if i need to do something more to achieve that viewWillDisapper method.