我如何将值从 ViewController 传递到 tabbar,然后将 tabor 传递到 ViewController 到 tabbar 中的第一个选定项目

How can i pass value from ViewController to tabbar and then tabor to ViewController to the first selected item in tabbar

如何将值从 ViewController 传递到 tabbar,然后将 tabor 传递到 ViewController 到从 start

选择的 tabbar 中的第一个选定项目

第一个ViewController

tabBarViewController* infoController = [self.storyboard instantiateViewControllerWithIdentifier:@"tabBarViewController"];
    infoController.adView = adView;
    [self.navigationController pushViewController:infoController animated:YES];

在标签栏视图控制器中:

 UIViewController *destView = [[self.tabBarController.viewControllers objectAtIndex:0] topViewController];
    NSLog(@"%@", destView);
UIViewController *destView = [[self viewControllers] objectAtIndex:0];
    NSLog(@"%@", destView);
    if ([destView isKindOfClass:[vc class]])
    {
        vc *destinationViewController = (vc *)destView;
        destinationViewController.adView = self.adView;
    }