Cocoa: The Responder Chain

Here is a helpful little method that you can use to print out the responder chain above a particular instance.

- (void)_printNextResponder {
    id nextObj = self;
    while (nextObj) {
        NSLog(@"nextResponder %@",nextObj);
        nextObj = [nextObj nextResponder];
    }
}
Wednesday, January 21, 2009