Skip to content

Instantly share code, notes, and snippets.

@mwahlig
Created June 8, 2015 16:19
Show Gist options
  • Save mwahlig/1eface9c6e89c34b9e08 to your computer and use it in GitHub Desktop.
Save mwahlig/1eface9c6e89c34b9e08 to your computer and use it in GitHub Desktop.
Recursively Print Child VC
- (void)printChildControllersForViewControllerRecursively:(UIViewController *)controller {
NSMutableString *logString = [NSMutableString stringWithString:[NSString stringWithFormat:@"child controllers for controller: %@ ::: [", controller]];
for (UIViewController *childController in controller.childViewControllers) {
[logString appendString:[NSString stringWithFormat:@"child: %@", childController]];
[self printChildControllersForViewControllerRecursively:childController];
}
NSLog(@"%@]",logString);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment