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.
Try this:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle: nil];
SettingsViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"setting"];
[self.navigationController pushViewController:viewController animated:YES];
Set the settingviewcontroller's identifier to "setting"
Use this:
SettingsViewController *viewController = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:[NSBundle mainBundle]];
[[self navigationController] pushViewController:viewController animated:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With