self.tabBarController.selectedIndex not calling viewDidAppear:YES
In a tabbar view when I call the tab to load useing self.tabBarController.selectedIndex the viewWillAppear is not called If i am been to the tab before hand is there a开发者_运维百科 way to force the view to reload.
self.tabBarController.selectedIndex = 3; [self.tabBarController.selectedViewController viewDidAppear:YES];
I was also thanking of dumping memory ever time i change tab's and that way when i get back to that view it reloads from the database.
you can implement
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
in the UITabBarControllerDelegate
(probably your app delegate). Then in there you can manually call the methods you want on whichever index's viewController you selected.
精彩评论