I have a tab bar that is created programmatically and I\'m having difficulties initializing a storyboard associated with a view.
I\'m able to load the view successfully
Swift 4
let storyboard = UIStoryboard(name: "Main", bundle: nil)
settingsViewController = storyboard.instantiateInitialViewController()
settingsViewController = storyboard.instantiateViewController(withIdentifier: "SettingsViewController")
If you want to initialize the view controller as in the storyboard you have to use the storyboard methods instead of allocating the view controller directly:
// load the storyboard by name
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
// either one of the two, depending on if your view controller is the initial one
settingsViewController = [storyboard instantiateInitialViewController];
settingsViewController = [storyboard instantiateViewControllerWithIdentifier:@"SettingsViewController"];