title: Adding a ViewController to Appdelegate
body: <p>I am trying to add a View Controller to the Appdelegate Class. My code goes this way..</p>
  
  <pre><code>[self.view addsubView:viewcontroller.view];
  </code></pre>
  
  <p>But unfortunately i am not able to view the controller view. Please suggest if i am going wrong somewhere.Thanks for ur time.</p>
  
  <p>The method in AppdidFinishLaunching is:-</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
      // Override point for customization after application launch.
      self.window.backgroundColor = [UIColor whiteColor];
      // [self.window addSubview:videoController.view];
      self.window.rootViewController = videoController;
      [self.window makeKeyAndVisible];    
      return YES;
  }
  </code></pre>
  
  <p>and in the Load view of ViewController i have written as</p>
  
  <pre><code>UIButton *playMovie = [UIButton buttonWithType:UIButtonTypeRoundedRect];
  playMovie.frame = CGRectMake(70,30,100,50);
  [playMovie setTitle:@"Play Movie" forState:UIControlStateHighlighted];
  [playMovie addTarget:self action:@selector(playMovie:) forControlEvents:UIControlEventTouchDown];
  [self.view addSubview:playMovie];
  </code></pre>
  
  <p>The problem here is i am not able to view the button and the view.Please help.</p>