Created
December 29, 2013 01:56
-
-
Save indyfromoz/8166616 to your computer and use it in GitHub Desktop.
Fade in a newly added subview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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