title: Switching between Views using NSViewControllers in OS X
body: <p>how to switch between multiple views using view controller(with the help of IBAction) ?</p>
  
  <p>This is the code I have written so far:</p>
  
  <p>In the interface file I have made an IBAction: </p>
  
  <pre><code>-(IBAction)Next;
  </code></pre>
  
  <p>and in the implementation file I have written this:</p>
  
  <pre><code>- (IBAction)Next
  {
    SecondPopovercontrol *second = [[SecondPopovercontrol alloc] initWithNibName:nil bundle:nil];
    [self presentingViewController:second animated: YES completion:NULL]; // This is the step I am facing issues with
  }
  </code></pre>
  
  <p>I am unable to get this running- the name of the 2 view controllers are: <code>WOMPopoverController</code> and <code>SecondPopovercontrol</code>. </p>
  
  <p>The error is: </p>
  
  <p>"No visible @interface for WOMPopoverController declares the selector presenting Viewcontroller:animated:completion"</p>
  
  <p>I am new to StackExchange, so if there is any inconsistency in my question please let me know. And, please guide me about how to solve this issue.</p>
  
  <p>thank you</p>