Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.