遍历子视图。

1 -(void)allview:(UIView *)rootview indent:(NSInteger)indent
2 {
3 NSLog(@"[%2d] %@",indent,rootview);
4 indent++;
5 for (UIView * aview in [rootview subviews])
6 {
7 [self allview:aview indent:indent];
8 }
9 }
posted @ 2011-10-11 16:57  lynn_ios  阅读(221)  评论(0编辑  收藏  举报