iOS 开发 - 具有无限层次的 uitableview [英] iOS development - uitableview with infinite levels

查看:34
本文介绍了iOS 开发 - 具有无限层次的 uitableview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在具有可变深度的树结构中有 XML 数据.有时数据馈送可以有 50 级深,有时它会是 5 级深.

I have XML data in a tree structure that has an variable depth. Sometimes the data feed can be 50 levels deep, other times it will be 5 levels deep.

我应该为视图使用哪个 iOS UI 组件?我看到了uitableview,但在打印叶节点之前它似乎只支持树的1级.我应该考虑另一个 UI 组件吗?如果没有,我该怎么办?

Which iOS UI component should I use for the view? I saw uitableview, but it seems to only support 1 level of the tree before printing the leaf nodes. Is there another UI component i'm supposed to consider? If not, what should I do?

推荐答案

如果这是针对 iPhone 的,我肯定会建议在每个级别都带有 UITableView 的标准 UINavigationViewController.这是处理层次结构的标准 iPhone 方式.

If this is for the iPhone, I would definitely suggest the standard UINavigationViewController with UITableView's at each level. This is the standard iPhone way of dealing with hierarchy.

在 iPad 上,有一个等效的弹出窗口(或侧边导航).这没问题——你可以使用它.

On iPad, there is an equivalent with the pop over (or side nav). This is ok -- and you could use that.

如果这是您应用的主要关注点,您可能希望利用更大的屏幕进行一些自定义操作.

If this is the main focus of your app, you might want to do something custom that takes advantage of the larger screen.

这篇关于iOS 开发 - 具有无限层次的 uitableview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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