title: How to fade out a NSView with animation?
body: <p>This is as simple as can be so I can't for the life of me find what's wrong, I looked through the documentation as a guide but it still didn't work. I have a view inside a larger view. An <code>IBAction</code> is supposed to fade out the inner view... that's it. Here's what I've got:</p>
  
  <pre><code>NSViewAnimation *theAnim;
  NSMutableDictionary *viewDict;
  
  // Create the attributes dictionary for the view.
  viewDict = [NSMutableDictionary dictionaryWithCapacity:2];
  
  // Set the target object to be the view.
  [viewDict setObject:_innerView forKey:NSViewAnimationTargetKey];
  
  // Set this view to fade out
  [viewDict setObject:NSViewAnimationFadeOutEffect forKey:NSViewAnimationEffectKey];
  
  theAnim = [[NSViewAnimation alloc] initWithViewAnimations:@[viewDict]];
  
  // Set some additional attributes for the animation.
  [theAnim setDuration:1.0];
  
  // Run the animation.
  [theAnim startAnimation];
  </code></pre>
  
  <p>I checked the <code>viewDict</code> and <code>theAnim</code> with <code>NSLog</code> and neither are <code>nil</code>. I pretty much copied this from an old program I had where this was working, can't find what's wrong now.</p>
  
  <p>I'm using Xcode 5.1.1.</p>