Skip to content

Instantly share code, notes, and snippets.

@indyfromoz
Created December 29, 2013 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indyfromoz/8166616 to your computer and use it in GitHub Desktop.
Save indyfromoz/8166616 to your computer and use it in GitHub Desktop.
Fade in a newly added subview
[fadingView setAlpha:0.0];
[containerView addSubview:fadingView];
[UIView beginAnimations:nil context:nil];
[fadingView setAlpha:1.0];
[UIView commitAnimations];
// Remove from superView
[UIView animateWithDuration:0.2
animations:^{viewOut.alpha = 0.0;}
completion:^(BOOL finished){[viewOut removeFromSuperview];}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment