title: iOS - Displaying child view controllers instantly with parent view controllers
body: <p>I multiple view controllers that will be displaying a dynamic view controller on a button click, here is how my view controllers are laid out:
  <img src="https://i.stack.imgur.com/4261e.png" alt="enter image description here"></p>
  
  <p>The  "calculationView" view does not display anything until the "Start" button is pressed.
  When the user presses the "Start" button "calculationView" in View Controller 2 displays a child view controller (not shown here).  </p>
  
  <p>The back arrow in View Controller 2 takes the user back to Item 1 in the tab bar and displays the same view controller in VIew Controller 2 in calculationView.  </p>
  
  <p>Now, everything works fine except that the content in calculationView in View Controller 1 appears about a ~sec after the view displays.</p>
  
  <p><strong>Here is how I load calculationView in View Controller 2:</strong>  </p>
  
  <pre><code>- (IBAction)startRunning:(id)sender {
      NSLog(@"Start button pressed.");
  
      helper = [[RunsDataHelper helper] init];
  
      // Set this value to true so then other views also display the calculationsView
      [helper setRunInProgres:YES];
  
      // Add Calculations View Controller
      CalculationViewController *calculationController = [self.storyboard instantiateViewControllerWithIdentifier:@"Calculate"];
      [self addChildViewController:calculationController];
      calculationController.view.frame = self.calculationView.bounds;
      [UIView transitionWithView:self.calculationView
                        duration:0.4
                         options:UIViewAnimationOptionTransitionCurlDown
                      animations:^{
                          [self.calculationView addSubview:calculationController.view];
                      }
                      completion:nil];
      [calculationController didMoveToParentViewController:self];
  
  }
  </code></pre>
  
  <p><strong>Here is how I use the runInProgress BOOL to display calculationView in View Controller 1:</strong></p>
  
  <pre><code>-(void)viewDidAppear:(BOOL)animated
  {
      [super viewDidAppear:animated];
      helper = [[RunsDataHelper helper] init];
      if([helper runInProgres] == YES)
      {
  
          //Add Calculations View Controller
          CalculationViewController *calculationController = [self.storyboard instantiateViewControllerWithIdentifier:@"Calculate"];
          [self addChildViewController:calculationController];
          calculationController.view.frame = self.calculationView.bounds;
          [self.calculationView addSubview:calculationController.view];
          [calculationController didMoveToParentViewController:self];
      }
  
  }
  </code></pre>
  
  <p><strong>Questions:</strong><br>
  Now my question is how can I make it so it the calculationView appears at the same time with the View Controller 1.</p>
  
  <p>Also, I have a design question. the calculationView is going to be in a static place on every View Controller. Is there a better way to display calculationView on every view controller based on runInProgress BOOL.</p>