In my application, i have a UIViewController that presents a UItabBarController (that has 3 NavigationControllers as tabBarItems), then i dismiss the UITabBarController from that UIViewController.
But when i present it again, the old data still shows on the tabBarController (i mean all the data that is displayed on the UIViewControllers of the NavigationControllers is still displayed). I want the UITabBarController as good as new when it is presented again. How to do this??
Here's the code:
In AppDelegate.h, i made this property
@property (strong, nonatomic) UITabBarController *tabBarController;
Then, in AppDelegate.m
self.customerCareNavController = [[UINavigationController alloc] initWithRootViewController:self.custCareVC];
self.customerCareNavController.title = @"Customer Service";
self.purchaseOrderNavController = [[UINavigationController alloc] initWithRootViewController:self.POController];
self.purchaseOrderNavController.title = @"PO";
self.accAndContactsNavController = [[UINavigationController alloc] initWithRootViewController:self.accAndContactsController];
self.accAndContactsNavController.title = @"Accounts And Contacts";
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:self.customerCareNavController, self.accAndContactsNavController, self.purchaseOrderNavController, nil];