带有多个故事板的UISplitView [英] UISplitView with multiple storyboards

查看:122
本文介绍了带有多个故事板的UISplitView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含概述(表格视图)和多个详细视图(不同类型的视图)的iPhone应用程序。出于模块化的目的,所有细节视图都使用单独的故事板。

I have an iPhone app containing overview (table view) and multiple detail views (different kinds of views). For the purpose of modularity, all detail views use separate storyboards.

现在我需要使我的应用程序具有通用性。为此,我想使用 UISplitView ,将概述作为主视图,并在右侧加载详细信息视图。但是,我不确定是否可以使用我的多个故事板来完成它。

Now I need to make my app universal. For that, I want to use an UISplitView with the overview as master view and load the details views on the right. However, I am not sure that it is possible to do it with my multiple storyboards.

我有什么可能性?我必须保持应用程序模块化。我已经为iPhone和iPad分开了故事板,但这对我来说并不是很有帮助。

What are my possibilities? I have to keep the app modular. I have already separate storyboards for iPhone and iPad but that doesn't really help me yet.

我会很感激任何建议。

推荐答案

如果其他人对这个话题感兴趣...我得到了它的工作。

In case that someone else is interested on the topic... I got it working.

我只是从它所在的故事板中实例化我需要的控制器并将其加载到详细视图中(类似于 MuptipleDetailViews 样本)。当然,我必须调整与各个控制器相关的整个导航,特别是修改控件和表格单元格上的点击方法。

I just instantiate the controller I need from the storyboard where it is located and load it in the detail view (similarly to the MuptipleDetailViews sample). Of course, I had to adjust the entire navigation related to the respective controllers and, especially, to modify the methods for taps on controls and table cells.

希望这会有所帮助其他人在开发iPad应用程序。 :)

Hope that will help someone else working on iPad apps. :)

这篇关于带有多个故事板的UISplitView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆