title: XCode/Cocoa Mac Changing Views
body: <p>I'm having trouble figuring out how to change between different custom views in my XCode project.</p>
  
  <p>I have my Main nib file, consisting of 1 main window, and 5 custom views. The main window consists of 5 buttons, all which need to connect to the different views. So for example I click on button 1 and it closes the current menu and loads custom view 1.</p>
  
  <p>I'm having trouble figuring out how this would be done.</p>
  
  <p>I guess I would create IBOutlets for the 5 different buttons and the 5 custom views, and connect them to different methods such as openView1, openView2, where each method would close the current menu and load the custom view?</p>
  
  <p>Could anyone help me code-wise how I would achieve this?</p>
  
  <p>Any help greatly appreciated.</p>
  
  <p>Thanks</p>