I wonder if someone can help. Given the storyboard below:
{Sorry I wanted to post an image but since I am new here they wouldn't let me to}
|Test View Controller| -- |TabBar Controller| -- |View Controller - Item 1| | | | | | |
I want to click the button in the Test View Controller. I have the UIButton hooked up. In preparing for segue in the test View Controller I have this:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([segue.identifier isEqualToString:@"Results"])
{
[segue.destinationViewController setCurrentUserData:initialUserData];
}
}
In View Controller - Item 1 in the far right, I do have the initialUserData:
@property (strong, nonatomic) NSMutableArray *currentUserData;
However, when I run the program, the exception below is thrown:
-[UITabBarController setAllUserData:]: unrecognized selector sent to instance 0x6d6c2a0
So I guess the prepare for segue should actually be to the Tab Bar Controller. I attempted to create a custom Tab Bar Controller class with the property above and I no longer have the exception but I am stuck in passing another prepare for segue from the Tab Controller to the View Controller - Item 1 so as I can finally have my results in that view. The thing is that when you click the connection from the Tab Bar Controller to the View Controller - Item 1 you cannot specify a segue identifier in there, so logically I must be doing something wrong in here... Does anyone have any idea what I am doing wrong?