title: Iphone Splash Screen
body: <p>I am really trying to do my best but I can't really find out what's going wrong in my code. I made a lot of search but I guess I just can't understand some objective c basics ;)</p>
  
  <p>My first question is related to the code below :</p>
  
  <pre><code>[window addSubview:tabBarController.view];
  
  UIImage *image = [UIImage imageNamed:@"lol.png"];
  UIImageView *defaultImage = [[UIImageView alloc] initWithImage:image];
  </code></pre>
  
  <p>Does it make a difference doing this :</p>
  
  <pre><code>[window addSubview:defaultImage];
  </code></pre>
  
  <p>or this :</p>
  
  <pre><code>[tabBarController.view addSubview:defaultImage];
  </code></pre>
  
  <p>My second question is about creating a splash screen. I tried to do it by myself but I just can't find out what's not working (we're in appDelegate) :</p>
  
  <pre><code>[window addSubview:tabBarController.view];
  
  UIImage *image = [UIImage imageNamed:@"lol.png"];
  UIImageView *defaultImage = [[UIImageView alloc] initWithImage:image]; 
  
  [window addSubview:defaultImage];
  [window makeKeyAndVisible]; //makes the window visible right ?
  
  UIImage *image2 = [UIImage imageNamed:@"lol2.png"];
  UIImageView *pubImage = [[UIImageView alloc] initWithImage:image2];
  
  [UIView setAnimationDelegate:self];
  [UIView beginAnimations:nil context:nil];
  [UIView setAnimationDuration:2.0];
  [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:window cache:YES]; //not sure about the forView:window ...
  
  [defaultImage removeFromSuperview];
  [window addSubview:pubImage];
  
  [UIView commitAnimations];
  </code></pre>
  
  <p>Hmm, I guess since I called "makekeyandvisible" window should be visible and animation should be showed to users ...</p>
  
  <p>Well, I am missing a step as it doesn't work :D.</p>
  
  <p>Help welcome,</p>
  
  <p>Gauthier.</p>