-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxolawareDebugUtilities.m
More file actions
43 lines (31 loc) · 1.03 KB
/
xolawareDebugUtilities.m
File metadata and controls
43 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// xolawareDebugUtilities.h
// xolaware utilities
//
// Created by me on 2012.05.03.
#include "xolawareOpenSourceCopyright.h" // Copyright (c) 2012 xolaware.
#import "xolawareDebugUtilities.h"
@implementation xolawareDebugUtilities
+ (void)subViewsScrollToTopForView:(UIView*)uiView level:(int)level
{
NSMutableString* str = [NSMutableString string];
for (int i = 0; i < level; i++)
[str appendString:@" "];
[str appendFormat:@"%@", [uiView class]];
if ([uiView isKindOfClass:[UITableView class]]
&& ![@"UITableView" isEqualToString:[str substringFromIndex:level*2]])
[str appendString:@" : UITableView "];
if ([uiView isKindOfClass:[UIScrollView class]]) {
[str appendString:@" : UIScrollView "];
UIScrollView* scrollView = (UIScrollView*)uiView;
if (scrollView.scrollsToTop) {
[str appendString:@" >>>scrollsToTop<<<<"];
}
NSLog(@"%@", str);
} else if (uiView.subviews.count) {
NSLog(@"%@", str);
}
for (UIView* sv in uiView.subviews)
[self subViewsScrollToTopForView:sv level:level+1];
}
@end