title: How to call a View Controller programmatically?
body: <p>I have looked at all the tutorials I can find on this one, and I still don't have the answer.  I need to call another view from the code.  I am using <code>UIStoryboards</code>.  I have changed the view many times by control-dragging from <code>UIButtons</code>, but now it must be from the code.  I am trying to call the info page from the main menu if it is the first time the user has opened the app.  I cannot seem to find a way to change the views from the code, however.  All my views are controlled by the same files (<strong>ViewController2</strong>).  The <code>identifier</code> of my main menu is <strong>ViewControllerMain</strong>, and the <code>identifier</code> of the info page is <strong>ViewControllerInfo</strong>.  First I tried this:</p>
  
  <pre><code>[ViewControllerMain presentViewController: ViewControllerInfo 
                                   animated:YES 
                                 completion: NULL];
  </code></pre>
  
  <p>Then I tried making different <code>UIViewControllers</code> for each and saying:</p>
  
  <pre><code>[ViewController2 presentViewController: ViewController 
                                animated:YES 
                              completion: NULL];
  </code></pre>
  
  <p>Neither worked.  For the first one, it says:</p>
  
  <blockquote>
    <p>Use of undeclared identifier ViewControllerMain.</p>
  </blockquote>
  
  <p>In the second one, it says:</p>
  
  <blockquote>
    <p>unexpected interface name 'ViewController': expected identifier.</p>
  </blockquote>
  
  <p>What can I do?</p>