Skip to content

Instantly share code, notes, and snippets.

@veader
Created April 12, 2011 02:39
Show Gist options
  • Save veader/914818 to your computer and use it in GitHub Desktop.
Save veader/914818 to your computer and use it in GitHub Desktop.
Fading Animation
NSDictionary *fadeOutDict = [NSDictionary dictionaryWithObjectsAndKeys:_mainFeedViewController.view, NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, NSViewAnimationEffectKey, nil];
NSAnimation *animation = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:fadeOutDict, nil]];
[animation setDelegate:self];
[animation setFrameRate:60.0];
[animation setDuration:0.5f];
[animation setAnimationBlockingMode:NSAnimationBlocking];
[animation setAnimationCurve:NSAnimationEaseIn];
[animation startAnimation];
[animation release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment