Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created July 2, 2015 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/2a7e49d54b95826ddda9 to your computer and use it in GitHub Desktop.
Save mikeabdullah/2a7e49d54b95826ddda9 to your computer and use it in GitHub Desktop.
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