あるストーリーボードから別のストーリーボードにセグエしたり、ストーリーボードを別のストーリーボードのビューコントローラーに埋め込んだりすることは可能ですか?私は配置する必要がある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];
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加