title: Alternative to add subview everytime app does addChildViewController
body: <p>We have a viewcontroller which has two modes of view - list and map.
  Earlier we were doing the toggle by using our custom tabcontroller. But now, as we didnt want to show tabs and do some more things, we are doing it by adding childviewcontrollers.
  But there are few subviews which are common in both child view, like filters.
  So, this is how we are doing it now:</p>
  
  <pre><code>- (void)switchView:(UIButton *)sender {
  if(!self.mapVisible) {
      self.mapVisible = YES;
  
      _mapViewController.view.frame = self.view.bounds;
      [self addChildViewController:_mapViewController];
      [_listViewController willMoveToParentViewController:nil];
      [self transitionFromViewController:_listViewController
                        toViewController:_mapViewController
                                duration:0.7
                                 options:UIViewAnimationOptionTransitionFlipFromLeft
                              animations:nil
                              completion:^(BOOL done){
                                  [_mapViewController didMoveToParentViewController:self];
                                  [_listViewController removeFromParentViewController];
  
                                  [self setupFooterAfterFlip];
                              }];
  } else {
      self.mapVisible = NO;
  
      _listViewController.view.frame = self.view.bounds;
      [self addChildViewController:_listViewController];
      [_mapViewController willMoveToParentViewController:nil];
      [self transitionFromViewController:_mapViewController
                        toViewController:_listViewController
                                duration:0.7
                                 options:UIViewAnimationOptionTransitionFlipFromRight
                              animations:nil
                              completion:^(BOOL done){
                                  [_listViewController didMoveToParentViewController:self];
                                  [_mapViewController removeFromParentViewController];
  
                                  [self setupFooterAfterFlip];
                              }];
  }
  }
  </code></pre>
  
  <p>We call the switchview method every time we toggle between views. As you can see, we are setting up the footer everytime from scratch. Is their a more efficient way so that self.view keeps the footer and only toggles between listview and mapview?</p>