title: Trying to fade in a UIView without success
body: <p>I am trying to fade in a UIView as a subview of my main view. The UIView I am trying to fade in has the dimensions of 320x55.</p>
  
  <p>I setup the view and a timer;</p>
  
  <pre><code>secondView.frame = CGRectMake(0, 361, 320, 55);
  secondView.alpha = 0.0;
  [self.view addSubview:secondView];
  [NSTimer scheduledTimerWithTimeInterval:.5 target:self selector:@selector(fadeView) userInfo:NO repeats:NO];
  </code></pre>
  
  <p>The timer triggers the following code;</p>
  
  <pre><code>secondView.alpha = 1.0;
  CABasicAnimation *fadeInAnimation;
  fadeInAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];
  fadeInAnimation.duration = 1.5;
  fadeInAnimation.fromValue = [NSNumber numberWithFloat:0.0];
  fadeInAnimation.toValue = [NSNumber numberWithFloat:1.0];
  [fadeInAnimation setDelegate:self];
  [secondView.layer addAnimation:fadeInAnimation forKey:@"animateOpacity"];
  </code></pre>
  
  <p>My secondView is connected in Interface Builder and responds to other messages but I can't see anything happening on screen.</p>
  
  <p>Can anyone please help me figure out what's going on here?</p>
  
  <p>Thanks,
  Ricky.</p>
  
  <hr>
  
  <p>In reply to a following recommendation:</p>
  
  <p>I'm a bit unsure here. Initially I put this code in (because I see secondView as an instance of UIView?): </p>
  
  <pre><code>[secondView beginAnimations:nil context:NULL]; 
  [secondView setAnimationDuration:0.5]; 
  [secondView setAlpha:1.0]; 
  [secondView commitAnimations]; 
  </code></pre>
  
  <p>I then tried your suggestion which didn't produce warnings or errors, but it still does brings nothing to the surface: </p>
  
  <pre><code>[UIView beginAnimations:nil context:NULL]; 
  [UIView setAnimationDuration:0.5]; 
  [secondView setAlpha:1.0]; 
  [UIView commitAnimations]; 
  </code></pre>
  
  <p>Thanks! Ricky.</p>
  
  <hr>