Created
July 2, 2015 16:57
-
-
Save mikeabdullah/2a7e49d54b95826ddda9 to your computer and use it in GitHub Desktop.
Locating child View Controllers based on containing view
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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