我在问,因为这里找不到答案。我有单例类从互联网上获取一些数据。在我获取数据之后,我需要将它传输到位于主视图控制器和导航控制器之后的第二位的视图控制器。
SingletonClass | | NavController-> MainViewController-> GettingDataViewcontroller(在我的例子中是ImagePickerViewController)
我尝试过所有我知道的事情:
ImagePickerViewController *imgPicker = [[ImagePickerViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:imgPicker];
UIViewController *vc = [[[[UIApplication sharedApplication] windows] firstObject] rootViewController];
[imgPicker getParsedUrls:self.picturesUrl];
[vc presentViewController:nav animated:YES completion:nil];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
ImagePickerViewController *imgPicker = [storyboard instantiateViewControllerWithIdentifier:@"ImagePicker"];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:imgPicker];
UIViewController *vc = [[[[UIApplication sharedApplication] windows] firstObject] rootViewController];
[imgPicker getParsedUrls:self.picturesUrl];
[vc presentViewController:nav animated:YES completion:nil];
在两种方式中,我都会获得第二个控制器中的标志代码。我正在接受它。
我想念的是什么?谢谢你的帮助