Last active
January 4, 2016 01:29
-
-
Save DaveBatton/8548872 to your computer and use it in GitHub Desktop.
Sets the backgroundColor of the specified view and all of its subviews. A tool to help debug iOS UI issues.
This file contains 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
- (void)colorizeView:(UIView *)view | |
{ | |
static CGFloat alpha = 0.1f; | |
view.backgroundColor = [[UIColor blueColor] colorWithAlphaComponent:alpha]; | |
alpha += 0.1f; | |
for (UIView *subview in view.subviews) { | |
[self colorizeView:subview]; | |
} | |
alpha -= 0.1f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment