Created
September 1, 2011 15:38
-
-
Save ddeville/1186439 to your computer and use it in GitHub Desktop.
Recursively print UIView hierarchy for a particular view
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)printViewHierarchy:(UIView *)view | |
{ | |
if (view == nil) | |
return; | |
NSLog(@"%@", view); | |
for (UIView *subview in [view subviews]) | |
{ | |
[self printViewHierarchy: subview]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment