Try doing this:
HomeViewController *homeView = [[HomeViewController alloc]init];
[self presentViewController:homeView animated:YES completion:nil];
Also note that black is the default colour of the window. If you don’t have any view controller named HomeViewController, and you present it, by default it will be visible as black colour to the user.
To Avoid this, you need to set the View for the newly presented view controller, which you can access by homeView.view
If you are using storyboard, then use storyboard ID:
HomeViewController *homeView = [self.storyboard instantiateViewControllerWithIdentifier:@"HomeViewController"];
[self presentViewController:homeView animated:YES completion:nil];
0
solved presenting a view controller