Reputation: 829
I want to send data from ParcelResultViewController to ViewController(Main) but I don't have connection segue between ParcelResultViewController and viewcontroller. I shared my storyboard image and code block.
How can handle this situation ?
ParcelResultViewController.m
if (nil == self.viewcontroller) {
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
self.viewcontroller = [storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
self.viewcontroller.fieldAliases = self.gonderilenFeatureSet.fieldAliases;
self.viewcontroller.displayFieldName = self.gonderilenFeatureSet.displayFieldName;
NSLog(@"%@",[self.gonderilenFeatureSet.features objectAtIndex:indexPath.row]);
}
//the details view controller needs to know about the selected feature to get its value
self.viewcontroller.feature = [self.gonderilenFeatureSet.features objectAtIndex:indexPath.row];
Upvotes: 2
Views: 131
Reputation: 6112
Send a notification from the parse controller with the data as object.
Use the NSNotificationCenter
to do that.
Upvotes: 2