Created
July 2, 2015 16:50
-
-
Save mikeabdullah/f67640ffadb65cb13766 to your computer and use it in GitHub Desktop.
Locating child View Controllers based on restoration identifier
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) { | |
NSString *identifier = [aController identifier]; | |
if ([identifier isEqualToString:@"master"]) { | |
self.masterViewController = aController; | |
} | |
else if ([identifier isEqualToString:@"detail"]) { | |
self.detailViewController = aController; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment