title: How to click a button programmatically?
body: <p>I have 2 view controllers which should be swapped according to userinput. So, I want to switch the views programatically based on the input I get from a text file.</p>
  
  <pre><code>Algorithm : 
  if(input == 1)
  {
      Go to View Controller 1
  }
  else if(input ==2)
  {
      Go to View Controller 2 
  }
  </code></pre>
  
  <p>Any help on how to click the button programmatically or load that particular viewcontroller with input?</p>