И аудиофильный, и подход Флавиу в порядке.Но вам обоим не хватает одной дополнительной строки кода.
Я обнаружил, что вы должны сначала выделить и инициализировать объект UIWindow.Я не знаю, почему, но инициализация объекта решила проблемы.
self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
аудиофильный подход:
self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
ResultsInListViewController *resultsInListViewController = (ResultsInListViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"ResultsInListViewController"];
[self.window addSubview:resultsInListViewController.view];
[self.window makeKeyAndVisible];
подход Флавиу:
self.window=[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
ResultsInListViewController *resultsInListViewController = (ResultsInListViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"ResultsInListViewController"];
[self.window setRootViewController:resultsInListViewController];
[self.window makeKeyAndVisible];