iOS how to get a reference to a view controller embedded in a storyboard container with a segue?

you must implement the prepareForSegue in main ViewController and specify an identifier in your StoryBoard.

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Make sure your segue name in storyboard is the same as this line
    if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"])
    {
        // Get reference to the destination view controller
        YourViewController *vc = [segue destinationViewController];

    }
}