title: Change Container View Content with Tabs in iOS
body: <p>I'm trying to make a form that spans three tabs. You can see in the screenshot below where the tabs will be. When the user taps a tab, the Container View should update and show a particular view controller I have.</p>
  
  <p><img src="https://i.stack.imgur.com/qwCDb.png" alt="view controller"></p>
  
  <p>Tab 1 = View Controller 1 </p>
  
  <p>Tab 2 = View Controller 2 </p>
  
  <p>Tab 3 = View Controller 3 </p>
  
  <p>The view controller shown above has the class PPAddEntryViewController.m. I created an outlet for the Container view within this class and now have a Container View property:</p>
  
  <pre><code>@property (weak, nonatomic) IBOutlet UIView *container;
  </code></pre>
  
  <p>I also have my IBActions for my tabs ready:</p>
  
  <pre><code>- (IBAction)tab1:(id)sender {
    //...
  }
  - (IBAction)tab2:(id)sender {
    //...
  }
  - (IBAction)tab3:(id)sender {
    //...
  }
  </code></pre>
  
  <p><strong>How do I set the container in those IBActions to change the view controller that the Container View holds?</strong></p>
  
  <p>Among a few other things, here's what I've tried:</p>
  
  <pre><code>UIViewController *viewController1 = [self.storyboard instantiateViewControllerWithIdentifier:@"vc1"];
  _container.view = viewController1;
  </code></pre>
  
  <p>...but it doesn't work. Thanks in advance.</p>