是否可以从一个情节提要分割到另一个情节提要,或者将一个情节提要嵌入到另一个情节提要中的视图控制器中?我需要把UITabBarController
放在UINavigationController
里,我想让它们保持整齐和分开.
是否可以从一个情节提要分割到另一个情节提要,或者将一个情节提要嵌入到另一个情节提要中的视图控制器中?我需要把UITabBarController
放在UINavigationController
里,我想让它们保持整齐和分开.
是的,但你必须通过编程来实现:
// Get the storyboard named secondStoryBoard from the main bundle:
UIStoryboard *secondStoryBoard = [UIStoryboard storyboardWithName:@"secondStoryBoard" bundle:nil];
// Load the initial view controller from the storyboard.
// Set this by selecting 'Is Initial View Controller' on the appropriate view controller in the storyboard.
UIViewController *theInitialViewController = [secondStoryBoard instantiateInitialViewController];
//
// **OR**
//
// Load the view controller with the identifier string myTabBar
// Change UIViewController to the appropriate class
UIViewController *theTabBar = (UIViewController *)[secondStoryBoard instantiateViewControllerWithIdentifier:@"myTabBar"];
// Then push the new view controller in the usual way:
[self.navigationController pushViewController:theTabBar animated:YES];