Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created July 2, 2015 16:50
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/f67640ffadb65cb13766 to your computer and use it in GitHub Desktop.
Save mikeabdullah/f67640ffadb65cb13766 to your computer and use it in GitHub Desktop.
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