title: AppDelegate UIWindow addSubView in different viewController
body: <p>I am trying to add a UILabel in UIWindow of AppDelegate from a UIViewController. This is how I am doing this:</p>
  
  <p><strong>AppDelegate code</strong> :  </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.
      if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
          self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil] autorelease];
      } else {
          self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil] autorelease];
      }
  
  
  
      [self.window makeKeyAndVisible];
  
      self.window.rootViewController = self.viewController;
  
  
      return YES;
  }
  </code></pre>
  
  <p><strong>ViewController code</strong> :  </p>
  
  <pre><code>- (void)viewDidLoad
  {
  
      UILabel *abcd=[[UILabel alloc] initWithFrame:CGRectMake(100.0, 100.0, 200.0, 40.0)];
  
      abcd.text=@"loading...";
  
      abcd.backgroundColor=[UIColor clearColor];
  
      [[[[UIApplication sharedApplication] delegate] window] addSubview:abcd];
  
      [super viewDidLoad];
  
  
  }  
  </code></pre>
  
  <p>But all I am seeing is grey screen but no label. Where I might be going wrong?  </p>