title: OS X [NSTimer scheduledTimerWithTimeInterval...] function in windowDidLoad not working
body: <p>I am a iOS developer and going to develop an OS X application.
  However they are so different from each other.</p>
  
  <p>I want to add a splash screen at the application startup.</p>
  
  <pre><code>- (void) applicationDidFinishLaunching:(NSNotification *)aNotification {
  
   // Hide main window
   [self.window orderOut:nil];
  
   SplashWindowController *splashWindowController = [[SplashWindowController alloc] initWithWindowNibName:@"SplashWindowController"];
  
   [NSApp runModalForWindow:splashWindowController.window];
   [splashWindowController release];
  
   // Show main window
   ...
  </code></pre>
  
  <p>And here is "SplashWindowController.m"</p>
  
  <pre><code>- (void)windowDidLoad {
    [super windowDidLoad];
  
    [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(hideSplash) userInfo:nil repeats:NO];
  }
  
  - (void)hideSplash {
    [NSApp endSheet:self.window];
    [self.window orderOut:nil];
  }
  </code></pre>
  
  <p>I can see the appeared splash, but hideSplash function is never called.
  What's the reason?</p>