Alex Rivera | Logout

PushViewController Leads To Black Screen

Asked 2013-02-18T03:27:49.883
12
SettingsViewController *viewController = [[SettingsViewController alloc] init];
    [[self navigationController] pushViewController:viewController animated:YES];

When using this code in a NavigationController the scene shown is just a black screen. In storyboard it shows the content but it is not displayed on the phone.

Edit
Report

1 Answer

1

Use this:

SettingsViewController *viewController = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:[NSBundle mainBundle]]; 
[[self navigationController] pushViewController:viewController animated:YES];
answered 2013-02-18T03:30:35.143

Your Answer