Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Locating child View Controllers based on containing view
- (void)viewDidLoad {
[super viewDidLoad];
for (NSViewController *aController in self.childViewControllers) {
if ([aController.view isDescendantOf:self.containerView]) {
self.contentViewController = aController;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment