0

我正在开发一个简单的 iPad 应用程序。我有一个类别对象数组,每个类别对象都包含一个与该类别相关的项目对象数组。I want to show the categories on the left of the screen (in a UITableView), and whenever a category object is selected, I want to display the corresponding item objects (from the array of that category object) on the right (in a UITableView )。

我四处寻找一种设计它的好方法,我发现 UISplitView 提供了我需要的东西。但是,我也观察到将 UISplitView 与 TabBarController 一起使用可能会很痛苦。另一方面,我找不到使用 2 个 UITableViews 的任何缺点。那么,就我而言,是否有充分的理由使用 UISplitView 而不是相互连接的 2 个 UITableView?或者使用 2 个 UITableViews 而不是 UISplitView 有什么缺点吗?

请注意,我只想在横向模式下使用该应用程序,所以我不需要弹出的东西(见图)或允许我在方向为纵向时隐藏/取消隐藏的东西。

人像模式

4

1 回答 1

0

我认为如果您使用 SplitViewController 就像它在 iPad Mail stock 应用程序中实现的方式一样会更好。detailViewController 上有一个按钮,当点击它并摆脱 PopOverViewController 时,它会隐藏和取消隐藏它。

在此处此处查看有关 StackOverflow 的问题。还可以在此处观看有关 Vimeo 的视频教程,了解如何实现它。

于 2013-05-19T13:25:48.940 回答