Obtenir une description de l’arborescence d’une UIView
Dans la zone de Debug, il suffit d’utiliser recursiveDescription :
po [self.view recursiveDescription]
Et on obtient la description de toutes les UIView de l’arborescence de la vue concernée :
(lldb) po [self.view recursiveDescription] (id) $3 = 0x0bbc87b0 <UIView: 0xb988f00; frame = (0 0; 320 460); autoresize = RM+BM; layer = <CALayer: 0xb988f60>> | <UIImageView: 0xb988f90; frame = (0 -12; 320 460); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xb988ff0>> | <UIButton: 0xb981370; frame = (20 355; 44 55); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb981430>> | | <UIImageView: 0xb984800; frame = (0 0; 44 55); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb984860>> | | <UIButtonLabel: 0xb9832e0; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb983380>> | <UIButton: 0xb9865a0; frame = (77 355; 50 54); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb986660>> | | <UIImageView: 0xb984980; frame = (0 0; 50 54); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb9849e0>> | | <UIButtonLabel: 0xb988440; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb9884e0>> | <UIButton: 0xb983ce0; frame = (238 332; 54 78); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb983da0>> | | <UIImageView: 0xb97b580; frame = (0 0; 54 78); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97b5e0>> | | <UIButtonLabel: 0xb985b80; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb985c20>> | <UIButton: 0xb97c2a0; frame = (9 245; 109 82); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb97c360>> | | <UIImageView: 0xb97f630; frame = (0 0; 109 82); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97f690>> | | <UIButtonLabel: 0xb97e120; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97e1c0>> | <UIButton: 0xb97eb20; frame = (147 359; 40 50); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb97ebe0>> | | <UIImageView: 0xb97f7b0; frame = (0 0; 40 50); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97f810>> | | <UIButtonLabel: 0xb980950; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb9809f0>> | <UIImageView: 0xb989910; frame = (0 0; 320 47); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xb989970>> | <UIImageView: 0xb98b1a0; frame = (0 428; 320 32); autoresize = RM+BM; userInteractionEnabled = NO; layer = <CALayer: 0xb98ab80>> | <UIButton: 0xb979710; frame = (9 245; 109 82); hidden = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb974d70>> | | <UIImageView: 0xb97cdb0; frame = (0 0; 109 82); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97ce10>> | | <UIButtonLabel: 0xb97bfa0; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97c040>> | <UIButton: 0xb975950; frame = (100 265; 89 61); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0xb975a60>> | | <UIImageView: 0xb97cf30; frame = (0 0; 89 61); clipsToBounds = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb97cf90>> | | <UIButtonLabel: 0xb978950; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xb978a40>>