Wednesday, February 29, 2012

SubView-k kilogolasa


-(void) printAllChildrenOfView:(UIView*) view depth:(int) d {
    //Tabs are just for formatting
    NSString *tabs = @"";
    for (int i = 0; i < d; i++)
    {
        tabs = [tabs stringByAppendingFormat:@"\t"];
    }
    
    NSLog(@"%@%@", tabs, view);
    
    d++; //Increment the depth
    for (UIView *child in view.subviews)
    {
        [self printAllChildrenOfView:child depth:d];
    }
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.