title: ios fade out splash screen (iphone 5 friendly)
body: <p>I'm wanting to spoof the feel of the main splash screen fading out whenever <code>applicationDidBecomeActive</code> is called, but it's not working. What am I doing wrong?</p>
  
  <pre><code>- (void)applicationDidBecomeActive:(UIApplication *)application
  {
      if(IS_IPHONE_5)
          splash = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default-568h.png"]];
      else
          splash = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default.png"]];
  
      [self.window.rootViewController.view addSubview:splash];
  
      [UIView animateWithDuration:0.5 
                       animations:^{
                           splash.alpha = 0;
                       }
                       completion:^(BOOL finished) {
                           [splash removeFromSuperview];
                       }];
  }
  </code></pre>
  
  <p>Then you need to define the following somewhere. I use the project <code>.pch</code> but you can use your header if you want.</p>
  
  <pre><code>#define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) &lt; DBL_EPSILON )
  </code></pre>