是否可以从一个情节提要分割到另一个情节提要,或者将一个情节提要嵌入到另一个情节提要中的视图控制器中?我需要把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];

Ios相关问答推荐

如何正确测试后台URLSessionDownloadTask?

如何从ipad获取用户定义的设备名称,IOS版本应大于16在flutter

彩色进度线--SWIFT

如何遮罩,动画和添加阴影到CAShapeLayer?

在工作表上移动图像SwiftUI

阿拉伯文变音符号(Harakat)在文本对齐的UILabel中未对齐

SwiftUI 点击列表内不会触发 Select

SwiftUI 中的偏移量和按钮有问题吗?

迁移到 UIKit 生命周期的应用程序不会调用 SceneDelegate

如何在不支持并发的自动关闭中修复'async'调用?

向左或向右移动时如何水平翻转sprite?

缺少推送通知权利

使用 Vim 代替(或与)Xcode 进行 iOS 开发

Swift 错误:在其自己的初始值中使用的变量

每个版本的 iOS 都附带什么版本的移动 Safari?

如何确定 WKWebView 的内容大小?

为什么 Xcode 4 不创建任何产品?

UIView 中的 safeAreaInsets 在 iPhone X 上为 0

我可以在 UIScrollView 中使用 UIRefreshControl 吗?

未找到符号:kUTTypeImage