iOS UITableView 中的多列

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/506601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 15:36:20  来源:igfitidea点击:

iOS Multiple Columns in UITableView

iosuitableview

提问by Neo

I have multiple rows and columns of data. But iPhone UITableView contains only single column and multiple rows. How do I display my multi column data following Apple's Human Interface Guidelines?

我有多行和多列数据。但是 iPhone UITableView 只包含单列和多行。如何按照 Apple 的人机界面指南显示我的多列数据?

回答by Tanin

You probably need to build it by your own, or use a library, like UIGridView. (I'm the creator)

您可能需要自己构建它,或者使用诸如UIGridView 之类的库。(我是创造者)

You can learn the source code of UIGridView. It's really short.

你可以学习UIGridView的源代码。真的很短

回答by D K

If you are looking for something that looks like an Excel spreadsheet then I would recommend the MDSpreadviewclass. The source is available at http://mochidev.com/open. It looks pretty slick but bogs down if you have a lot of data to display.

如果您正在寻找看起来像 Excel 电子表格的东西,那么我会推荐该MDSpreadview课程。源代码可从http://mochidev.com/open 获得。它看起来很漂亮,但如果你有很多数据要显示,就会陷入困境。

Other than that, you should probably just create your own UITableViewCell. It's pretty easy with the new Storyboards of iOS5 and you can handle millions of cells of data.

除此之外,您可能应该创建自己的UITableViewCell. 使用 iOS5 的新 Storyboards 非常容易,您可以处理数百万个数据单元。

回答by Dimitri Bouniol

For those interested, I just updated MDSpreadViewto be muchfaster, and it supports practically an unlimited number of rows and columns (up until CGFloatstops being accurate to the pixel) with an API very similar to UITableView. More info on my site

对于那些有兴趣,我刚刚更新MDSpreadView快,它实际上是支持的行和列的数量不受限制(直至CGFloat停止是精确到像素)与API非常相似UITableView我的网站上的更多信息