我可以实现类似于iOS“文件夹"的功能吗? [英] Can I implement something similar to iOS "Folders"?

查看:79
本文介绍了我可以实现类似于iOS“文件夹"的功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将制作与iOS4文件夹在外观上非常相似的东西,但根本不是文件夹)))

I am going to make something that very visually similar to iOS4 folders but it's not folders at all )))

例如,我在屏幕上有4个标签-请参见草图.屏幕拆分,如果用户单击标签.其他勒贝尔族走下坡路,我们可以在分开的视图之间看到一些文本.如果用户再次单击-与以前一样回到正常"状态.等等.

For example, I have 4 labels on screen - see sketch. Screen splits, if user click on label. Other lebels going down and we can see some text between splited views. If user click once more - view back to "normal" state as before. And so on.

问题是:

  1. 是否面对iPhone HIG,并且可以拒绝应用程序?

  1. is it confront iPhone HIG and app can be rejected?

最简单的方法是什么?

what is the easiest way to implement this?

谢谢)

替代文本http://a.imageshack.us/img196/1306/sketch1 .gif

推荐答案

您的应用可以总是被拒绝,而没有任何理由.

Your App can always be rejected, for no reason at all.

这似乎不太像文件夹,而更像是带有可折叠项目的轮廓(或在编程编辑器中折叠代码).商店中有很多大纲应用程序之类的应用程序,因此没有理由应该这样做(但请再次阅读此答案的第一行!不保证!).

This seems less like folders and more like an outline with collapsable items (or code folding in a programming editor). Plenty of outliner like apps in the store so no reason you should be able to do this (but read the first line of this answer again! No promises!).

许多实现方法.这是一个随机的快速方法:如果使用UITableView,然后有一个UITableViewDataSource实现类,该类具有标记为隐藏/可见的项目.然后,您的numberOfRowsInSection方法只能返回可见行的数量,而tableView:cellForRowAtIndexPath:将不得不跳过隐藏的行(如果您有很多项目,这可能会太慢-如果是这样,则缓存可见计数,请使用索引的辅助数组(或NSMutableIndexSet)可见的项目等).

Lots of ways to implement this. Here's a random quick one: If you use a UITableView and then have a UITableViewDataSource implementing class that has items marked as hidden/vislble. Then your numberOfRowsInSection method could return only the number of visible rows and the tableView:cellForRowAtIndexPath: would have to skip hidden rows (this might be too slow if you have many items - if so, cache visible count, use secondary array of indexes (or NSMutableIndexSet) of visible items, etc).

这篇关于我可以实现类似于iOS“文件夹"的功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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