Created
May 18, 2011 20:08
-
-
Save sbrocket/979428 to your computer and use it in GitHub Desktop.
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
| // Version 1 | |
| [[self.scrollView subviews] enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) { | |
| [UIView animateWithDuration:0.25 animations:^{ | |
| obj.alpha = 0.0; | |
| } completion:^(BOOL finished) { | |
| [obj removeFromSuperview]; | |
| }]; | |
| }]; | |
| // Version 2 | |
| NSArray *scrollSubviews = [self.scrollView subviews]; | |
| [UIView animateWithDuration:0.25 animations:^{ | |
| [scrollSubviews enumerateObjectsUsingBlock:^(UIView *view, NSUInteger idx, BOOL *stop) { | |
| view.alpha = 0.0; | |
| }]; | |
| } completion:^(BOOL finished) { | |
| [scrollSubviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment