title: How can I manually switch between UIViewControllers in storyboard?
body: <p>All I need is to view a <code>UIView</code> controller in same storyboard file manually with code. I use storyboard to make all forms and connections. My application starts in navigation controller, which provides me access to <code>UIView</code> (<code>LoginViewController</code>) and then it goes to tab bar controller, which provides 4 <code>UIViews</code>. According to every <code>UIView</code> I have <code>.h</code> and <code>.m</code> files. I know about segue method, it is simple, but I need manual method. Maybe I am doing something wrong.</p>
  
  <p>I was trying to use this method for pushing view controller in <code>IBAction</code>:</p>
  
  <pre><code>[self.view pushViewController:LoginViewController animated:YES];
  </code></pre>
  
  <p>But it makes an error: </p>
  
  <blockquote>
    <p>Unexpected interface name ‘LoginViewController’: expected expression</p>
  </blockquote>
  
  <p>It took a lot of time to figure out what is wrong, but I had not succeed.
  Here is my <code>RollEnemyController.m</code> file:</p>
  
  <pre><code>//  RollEnemyController.m
  #import "RollEnemyController.h"
  #import "LoginViewController.h"
  @implementation RollEnemyController;
  @synthesize AttackButtonPressed;
  
  - (IBAction)AttackButtonPressed:(id)sender {
      LoginViewController* controller = [[LoginViewController alloc] initWithNibName:@"LoginViewController"  bundle:nil];
      [self.view pushViewController:controller];
  }
  
  @end
  </code></pre>
  
  <p>And this is header file:</p>
  
  <pre><code>//  RollEnemyController.h
  
  #import &lt;UIKit/UIKit.h&gt;
  
  @interface RollEnemyController : UIViewController
  
  - (IBAction)RollButtonPressed:(id)sender;
  @property (weak, nonatomic) IBOutlet UIButton *AttackButtonPressed;
  
  @end
  </code></pre>