I want to execute some code, before showing another view, when a user pushes the Bar Item with different view in a Tab Bar Controller.
I am trying to use delegation in my class:
@interface HPAAddCarOverallInfoTableViewController () <UITabBarControllerDelegate>
And I get close to my problem by using delegates method:
-(void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
Unfortunately, (UIViewController *)viewController
holds information about selected View Controller and not information about from what View Controller it was selected.
Question: Can You tell me, please. How I can get information which will tell me from what displayed view the Tab Bar Item was pushed?