When I use the code mentioned below, I get the desired splash screen with fade out on the iPhone simulator, but the picture seems to be zoomed with factor 2: I only get the upper left quarter of my initial picture (= launch image), zoomed to full screen. The launch image itself is shown in correct size at startup, before the splash screen kicks in.
Code is entered in didFinishLaunchingWithOptions in AppDelegate.
// Splash screen
UIImageView*imageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"IMG_1357.png"]];
[[navigationController view] addSubview:imageView];
[[navigationController view] bringSubviewToFront:imageView];
// as usual
[self.window makeKeyAndVisible];
//now fade out splash image
[UIView transitionWithView:self.window duration:4.0f options:UIViewAnimationOptionTransitionNone animations:^(void){imageView.alpha=0.0f;} completion:^(BOOL finished){[imageView removeFromSuperview];}];
Furthermore the splash screen doesn’t seem to appear on the device (iPhone 4S (Retina) with iOS 6.0), only on the simulator: when run on iPhone, it only displays the launch image.
What could be the cause and solution to both issues?
Thanks in advance!
Example:
To add a 1 second pause before the fade out:
or