Create a gist now

Instantly share code, notes, and snippets.

Locating child View Controllers based on restoration identifier
- (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