title: Open a new view controller on true iOS
body: <p>I'm learning iOS programming right now and I started off building an app. So right now I'm working on registering a user which sends the details of the user to a server and then responds with a json array. The result can be true or false. Now what I want to do is if the result is true, open up a new view controller. I searched online and on stackoverflow and I did this</p>
  
  <pre><code>if([operation boolValue] == 0){
          NSLog(@"Account Registered: %s","Yes");
          [self.navigationController pushViewController:MainViewController animated:YES];
  
  
      }
      else{
          NSLog(@"Account Registered: %s","No");
      }
  </code></pre>
  
  <p>But I get a "Use undeclared notifier" error and when I import the Main Controller I get a "unexpected interface name"</p>
  
  <p>Aso with segues I don't think I can get it to work because the result could be true or false. Anyway, it would be great if someone could show me how to get this working. </p>
  
  <p>ERROR:
  "Use of undeclared identifier 'MainViewController'; Did you mean 'UIViewController?'"</p>