I\'m doing some crazy multiple documents inside a single window stuff with the document-based architecture and I\'m 95% done.
I have this two-tier document architect
You can also add a category to class UIResponder with appropriate method that is possible to be used by any subclass of UIResponder.
@interface UIResponder (Inspect)
- (void)inspectResponderChain; // show responder chain including self
@end
@implementation UIResponder (Inspect)
- (void)inspectResponderChain
{
UIResponder *x = self;
do {
NSLog(@"%@", x);
}while ((x = [x nextResponder]));
}
@end
Than you can use this method somewhere in code as the example below:
- (void)viewDidLoad {
...
UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
[self.view addSubview:myView];
[myView inspectResponderChain]; // UIView is a subclass of UIResponder
...
}