如何从 UITabBarViewController 调用 sub-tableVIew 方法

How to call sub-tableVIew method from UITabBarViewController

- (void)tabBarController:(UITabBarViewController *)tabBarController   didSelectViewController:(UIViewController *)viewController {
NSLog(@"selected %lu",(unsigned long)tabBarController.selectedIndex);
   if (tabBarController.selectedIndex == 0) {
  //call refresh() in PlayerTableViewController 
   } else {
    // ...
   }
}

下面是UITabBarViewController.

在第 4 行,我想调用一个名为 refresh() 的方法来更新 PlayerTableViewController 中的数据。我该如何实施? 谢谢

- (void)tabBarController:(UITabBarViewController *)tabBarController       didSelectViewController:(UIViewController *)viewController {
NSLog(@"selected %lu",(unsigned long)tabBarController.selectedIndex);
 if (tabBarController.selectedIndex == 0) {
 //call refresh() in PlayerTableViewController 
 UINavigationController *navController = (UINavigationController *)tabBarController.selectedViewController;
 PlayerTableViewController *playerTableVC =(PlayerTableViewController *)  [navController.viewControllers firstObject];
 [playerTableVC.tableView reloadData];



} else {
// ...
}
}