有一个UIStoryboard
带有 a的 mainUITabBarController
有 5 个项目,每个项目都足够大,可以由它自己的故事板实例来表示。我想将所有 5 个分成不同的故事板。换句话说,当TabBarItem1
被选中时,我想UIViewController
从不同的情节提要加载其各自的,是否有可能实现这一点?我正在考虑为此以UITabBarController
编程方式创建,这会是最优雅的解决方案吗?
编辑 -
NSMutableArray *viewControllers = [NSMutableArray array];
MyViewController1 *myController1 = [[StoryboardManager myStoryboard1] instantiateInitialViewController];
myController1.title = @"Title";
[viewControllers addObject:myController1];
MyViewController2 *myController2 = [[StoryboardManager myStoryboard2] instantiateInitialViewController];
myController2.title = @"Title";
[viewControllers addObject:myController2];
// ...etc
self.viewControllers = viewControllers; // self - subclass of a UITabBarController