title: Loading a new view before the old one iphone sdk
body: <p>Probably just a simple question, but ive been building a little puzzle game and no decided i could do with a menu for it. Ive created the menu no problem i just cant get it to show before the puzzle. Ive tried changing the code in the appdelegate but its not liking it. </p>
  
  <p>slider appdelegate.h </p>
  
  <pre><code> #import &lt;UIKit/UIKit.h&gt;
  
  @class SliderViewController;
  @class MainMenu;
  
  @interface SliderAppDelegate : NSObject &lt;UIApplicationDelegate&gt; {
      UIWindow *window;
      MainMenu *viewController1;
  }
  
  @property (nonatomic, retain) IBOutlet UIWindow *window;
  @property (nonatomic, retain) IBOutlet SliderViewController *viewController;
  @property (nonatomic, retain) IBOutlet MainMenu *viewController1;
  @end
  </code></pre>
  
  <p>Slider appdelegate.m </p>
  
  <pre><code>#import "SliderAppDelegate.h"
  #import "SliderViewController.h"
  
  @implementation SliderAppDelegate
  
  @synthesize window;
  @synthesize viewController;
  @synthesize viewController1;
  
  
  #pragma mark -
  #pragma mark Application lifecycle
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
  
      // Override point for customization after application launch.
  
      // Add the view controller's view to the window and display.
      [self.window addSubview:viewController1.view];
      [self.window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p>But doing that throws out an error:</p>
  
  <blockquote>
    <p>error: request for member 'view' in
    something not a structure or union</p>
  </blockquote>
  
  <p>I know its probably a stupid question but could anyone help please.</p>