In my App i have a situation where i Programmatically change the selected index of a tabBarController like this
[self.tabBarController setSelectedIndex:0];
and go back to my tab containing a UITableView’ at this point i need to make some actions on my tableView
i tried to use viewWillAppear and it didn’t get there, i tried to make the view delegate like this
@interface ThirdViewController : UITableViewController < UISearchBarDelegate,UINavigationControllerDelegate, UITabBarDelegate>
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{
it didn’t work
any one know how to do it?
I noticed that your class
ThirdViewControllerimplementsUITabBarDelegate, whiletabBarController:didSelectViewController:is in fact a method ofUITabBarControllerDelegateprotocol.