I have a ViewController that houses 2 Containers (one top, one bottom). Top Container houses a ViewController with a button and a textfield (just for illustrating purposes). What I want to do is:
- Type text
- Press button
- Send text to bottomViewController
- Display into table
How do I send text to the bottomViewController? Do I somehow have to talk to the parent?
I'm using Storyboards so I have this in the parentViewController
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSLog(@"Current Segue: %@", segue.identifier);
if ([segue.identifier isEqualToString:@"topSegue"]) {
self.enterCommentViewController = segue.destinationViewController;
}
else if ([segue.identifier isEqualToString:@"bottomSegue"]) {
self.commentsViewController = segue.destinationViewController;
}
}