Today, I remembered a handy tool, to use in the debugger, when you are working on view hierarchies. As useful as the new visual inspector (and previously tools like Reveal etc...) is, sometimes you want the information inline with the debugging process.
Thankfully this is easy without having to continually call superView or iterate through subViews arrays. All you have to do is call:
po [rootViewForTheViewHierarchy recursiveDescription]
And you'll get the hierarchy output into the debugger with much helpful state information about each view...
And here's the output in a text format:
<UIView: 0x78f90d20; frame = (0 0; 320 480); autoresize = RM+BM; layer = <CALayer: 0x78f90d80>> | <UIImageView: 0x78f90b70; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0x78f90bf0>> | <UIImageView: 0x78f90270; frame = (-4 -4; 346 498); opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; animations = { <UIMotionEffectGroup: 0x78f8e9e0>=<CAAnimationGroup: 0x78eb4890>; }; layer = <CALayer: 0x78f8ff40>> | <Blinc_NotesView: 0x78e6a050; frame = (0 0; 320 480); autoresize = RM+BM; gestureRecognizers = <NSArray: 0x78f8fcb0>; layer = <CALayer: 0x78e9fd60>> | <UIView: 0x78f90030; frame = (10 440; 300 30); autoresize = RM+BM; layer = <CALayer: 0x78f90440>> || <UIButton: 0x78f7dae0; frame = (230 3; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f88ba0>> ||| <UIImageView: 0x78f88d10; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78f8cd50>> ||| <UIImageView: 0x78eb6e20; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x78eb6ea0>> || <UIButton: 0x78f87df0; frame = (4 4; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f88be0>> ||| <UIImageView: 0x78ea98b0; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x79057d10>> ||| <UIImageView: 0x79154140; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x79154230>> || <UIButton: 0x78f77ec0; frame = (185 4; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f7a020>> ||| <UIImageView: 0x78f5e9a0; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78f5d4f0>> ||| <UIImageView: 0x79153400; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x79153480>> || <UIButton: 0x78e69f60; frame = (44 4; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78e66920>> ||| <UIImageView: 0x78e65b00; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78e68c20>> ||| <UIImageView: 0x79153980; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x79153a00>> || <UIButton: 0x78f8deb0; frame = (79 0; 40 30); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f8dfa0>> ||| <UIImageView: 0x78f8e160; frame = (-30 -35; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78f8e1e0>> ||| <UIButtonLabel: 0x78eba310; frame = (5 6; 30 18); text = 'Grid'; clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x78eb8680>> || <UIButton: 0x78f8e9f0; frame = (134 4; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f8eae0>> ||| <UIImageView: 0x78f8eb90; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78f8ec50>> ||| <UIImageView: 0x79156ec0; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x79156f40>> || <UIButton: 0x78f64c10; frame = (273 4; 22 22); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x78f5c000>> ||| <UIImageView: 0x78e5f050; frame = (-39 -39; 100 100); alpha = 0; opaque = NO; userInteractionEnabled = NO; tag = 1886548836; layer = <CALayer: 0x78e645f0>> ||| <UIImageView: 0x78eb8250; frame = (0 0; 22 22); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x78eb82d0>> | <_UILayoutGuide: 0x78f90dd0; frame = (0 0; 0 20); hidden = YES; layer = <CALayer: 0x78e9fca0>> | <_UILayoutGuide: 0x78f90f30; frame = (0 480; 0 0); hidden = YES; layer = <CALayer: 0x78f91020>>